bcachefs: Allow for new alloc fields
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 23 Nov 2018 04:05:13 +0000 (23:05 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:12 +0000 (17:08 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c

index 3f0e2dd29fde037d7974993870da3bcbb1372508..390b008b0200f025335f2ba37ab142952d73b337 100644 (file)
@@ -84,7 +84,8 @@ const char *bch2_alloc_invalid(const struct bch_fs *c, struct bkey_s_c k)
        case BCH_ALLOC: {
                struct bkey_s_c_alloc a = bkey_s_c_to_alloc(k);
 
-               if (bch_alloc_val_u64s(a.v) != bkey_val_u64s(a.k))
+               /* allow for unknown fields */
+               if (bkey_val_u64s(a.k) < bch_alloc_val_u64s(a.v))
                        return "incorrect value size";
                break;
        }