diff options
author | 2025-04-16 06:48:31 -0400 | |
---|---|---|
committer | 2025-05-21 20:14:20 -0400 | |
commit | 0dc73809e93aeb905acf9fa88502c73534cfa83d (patch) | |
tree | 33166e2ffda77b6eb7da0eca3e495d61e0b31a5f | |
parent | bcachefs: sb_validate() no longer requires members_v1 (diff) | |
download | wireguard-linux-0dc73809e93aeb905acf9fa88502c73534cfa83d.tar.xz wireguard-linux-0dc73809e93aeb905acf9fa88502c73534cfa83d.zip |
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>
-rw-r--r-- | fs/bcachefs/sb-downgrade.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/sb-downgrade.c b/fs/bcachefs/sb-downgrade.c index badd0e17ada5..296c6c925386 100644 --- a/fs/bcachefs/sb-downgrade.c +++ b/fs/bcachefs/sb-downgrade.c @@ -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; |