diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-06-28 19:59:56 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:06 -0400 |
commit | 24964e1c5c89e00ca55909ab24ce8d28e2b46406 (patch) | |
tree | 6ca19695501bb5947532e799c319c570e653f16e /fs/bcachefs/alloc_background.c | |
parent | 7c50140fce00120b1dcf674759393267689ca2d8 (diff) | |
download | linux-stable-24964e1c5c89e00ca55909ab24ce8d28e2b46406.tar.gz linux-stable-24964e1c5c89e00ca55909ab24ce8d28e2b46406.tar.bz2 linux-stable-24964e1c5c89e00ca55909ab24ce8d28e2b46406.zip |
bcachefs: BCH_SB_VERSION_UPGRADE_COMPLETE()
Version upgrades are not atomic operations: when we do a version upgrade
we need to update the superblock before we start using new features, and
then when the upgrade completes we need to update the superblock again.
This adds a new superblock field so we can detect and handle incomplete
version upgrades.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index b07c09a77089..0fc810ca5b6b 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -1232,8 +1232,7 @@ int bch2_check_alloc_hole_bucket_gens(struct btree_trans *trans, unsigned i, gens_offset, gens_end_offset; int ret; - if (c->sb.version < bcachefs_metadata_version_bucket_gens && - !c->opts.version_upgrade) + if (c->sb.version < bcachefs_metadata_version_bucket_gens) return 0; bch2_btree_iter_set_pos(bucket_gens_iter, alloc_gens_pos(start, &gens_offset)); |