diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-06 09:10:29 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-06 10:58:17 -0400 |
commit | 71dac2482ad3c8d4a8b8998a96751f009bad895f (patch) | |
tree | fca99859ccf4373a592600cd9c57c4c80deb07f8 /fs/bcachefs/bcachefs_format.h | |
parent | 88ab10186c44d0a8b90842beab8648b5fd14432d (diff) | |
download | linux-71dac2482ad3c8d4a8b8998a96751f009bad895f.tar.gz linux-71dac2482ad3c8d4a8b8998a96751f009bad895f.tar.bz2 linux-71dac2482ad3c8d4a8b8998a96751f009bad895f.zip |
bcachefs: BCH_SB_LAYOUT_SIZE_BITS_MAX
Define a constant for the max superblock size, to avoid a too-large
shift.
Reported-by: syzbot+a8b0fb419355c91dda7f@syzkaller.appspotmail.com
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bcachefs_format.h')
-rw-r--r-- | fs/bcachefs/bcachefs_format.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h index 8345a2b2d05b..2e8b1a489c20 100644 --- a/fs/bcachefs/bcachefs_format.h +++ b/fs/bcachefs/bcachefs_format.h @@ -903,6 +903,8 @@ unsigned bcachefs_metadata_required_upgrade_below = bcachefs_metadata_version_re #define BCH_SB_SECTOR 8 #define BCH_SB_MEMBERS_MAX 64 /* XXX kill */ +#define BCH_SB_LAYOUT_SIZE_BITS_MAX 16 /* 32 MB */ + struct bch_sb_layout { __uuid_t magic; /* bcachefs superblock UUID */ __u8 layout_type; |