summaryrefslogtreecommitdiff
path: root/fs/bcachefs/alloc_background.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-06-29 02:59:56 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:10:06 +0300
commit24964e1c5c89e00ca55909ab24ce8d28e2b46406 (patch)
tree6ca19695501bb5947532e799c319c570e653f16e /fs/bcachefs/alloc_background.c
parent7c50140fce00120b1dcf674759393267689ca2d8 (diff)
downloadlinux-24964e1c5c89e00ca55909ab24ce8d28e2b46406.tar.xz
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.c3
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));