mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
bcachefs: Shrink superblock downgrade table
Don't generate entries for versions that won't be able to mount. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -374,6 +374,9 @@ int bch2_sb_downgrade_update(struct bch_fs *c)
|
||||
if (BCH_VERSION_MAJOR(src->version) != BCH_VERSION_MAJOR(le16_to_cpu(c->disk_sb.sb->version)))
|
||||
continue;
|
||||
|
||||
if (src->version < c->sb.version_incompat)
|
||||
continue;
|
||||
|
||||
struct bch_sb_field_downgrade_entry *dst;
|
||||
unsigned bytes = sizeof(*dst) + sizeof(dst->errors[0]) * src->nr_errors;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user