summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/alloc_background_format.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-08-21 22:57:56 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-08-22 02:07:23 -0400
commit8ed823b19214e403ca485532f48c0e02035021ae (patch)
tree604e2c2c97466640686e01906e559c5fb2923d1c /fs/bcachefs/alloc_background_format.h
parentbcachefs: Fix warning in bch2_fs_journal_stop() (diff)
downloadlinux-8ed823b19214e403ca485532f48c0e02035021ae.tar.gz
linux-8ed823b19214e403ca485532f48c0e02035021ae.zip
bcachefs: Fix compat issue with old alloc_v4 keys
we allow new fields to be added to existing key types, and new versions should treat them as being zeroed; this was not handled in alloc_v4_validate. Reported-by: syzbot+3b2968fa4953885dd66a@syzkaller.appspotmail.com Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background_format.h')
-rw-r--r--fs/bcachefs/alloc_background_format.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/alloc_background_format.h b/fs/bcachefs/alloc_background_format.h
index 47d9d006502c..f754a2951d8a 100644
--- a/fs/bcachefs/alloc_background_format.h
+++ b/fs/bcachefs/alloc_background_format.h
@@ -69,6 +69,7 @@ struct bch_alloc_v4 {
__u64 io_time[2];
__u32 stripe;
__u32 nr_external_backpointers;
+ /* end of fields in original version of alloc_v4 */
__u64 fragmentation_lru;
__u32 stripe_sectors;
__u32 pad;