summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2018-11-22 23:05:13 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:12 -0400
commite88973373aaabebba6e59ff0ff74333eacd7bffb (patch)
treeda66c6cead21e6cc9807b170e4d096ecfbdc3222 /fs/bcachefs/alloc_background.c
parent9ca53b55f7415783c6cc8b751c99f2af6cc0a932 (diff)
downloadlinux-e88973373aaabebba6e59ff0ff74333eacd7bffb.tar.gz
linux-e88973373aaabebba6e59ff0ff74333eacd7bffb.tar.bz2
linux-e88973373aaabebba6e59ff0ff74333eacd7bffb.zip
bcachefs: Allow for new alloc fields
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r--fs/bcachefs/alloc_background.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 3f0e2dd29fde..390b008b0200 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -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;
}