diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-03-20 23:55:36 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:54 -0400 |
commit | e01dacf76c0c6a5fc6963b7857773b3d58740acb (patch) | |
tree | 6fd41c33ecef8708c2d1732cc68ad835475cfc2a /fs/bcachefs/recovery.c | |
parent | a4805d6672aac04784af132f0e11ac1dfb208079 (diff) | |
download | lwn-e01dacf76c0c6a5fc6963b7857773b3d58740acb.tar.gz lwn-e01dacf76c0c6a5fc6963b7857773b3d58740acb.zip |
bcachefs: Fix bkey format generation for 32 bit fields
Having a packed format that can represent a field larger than the
unpacked type breaks bkey_packed_successor() assertions - we need to fix this to start using the snapshot filed.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r-- | fs/bcachefs/recovery.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index e322dc35f992..edcf6389d2fd 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -1201,7 +1201,8 @@ use_clean: bch_verbose(c, "quotas done"); } - if (!(c->sb.compat & (1ULL << BCH_COMPAT_FEAT_EXTENTS_ABOVE_BTREE_UPDATES_DONE))) { + if (!(c->sb.compat & (1ULL << BCH_COMPAT_FEAT_EXTENTS_ABOVE_BTREE_UPDATES_DONE)) || + !(c->sb.compat & (1ULL << BCH_COMPAT_FEAT_BFORMAT_OVERFLOW_DONE))) { struct bch_move_stats stats = { 0 }; bch_verbose(c, "scanning for old btree nodes"); @@ -1287,6 +1288,7 @@ int bch2_fs_initialize(struct bch_fs *c) c->disk_sb.sb->features[0] |= 1ULL << BCH_FEATURE_atomic_nlink; c->disk_sb.sb->features[0] |= BCH_SB_FEATURES_ALL; c->disk_sb.sb->compat[0] |= 1ULL << BCH_COMPAT_FEAT_EXTENTS_ABOVE_BTREE_UPDATES_DONE; + c->disk_sb.sb->compat[0] |= 1ULL << BCH_COMPAT_FEAT_BFORMAT_OVERFLOW_DONE; bch2_write_super(c); mutex_unlock(&c->sb_lock); |