summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-01-14 16:19:23 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:51 -0400
commitac958006294ab462848bc69b9b5ddb1a8b99e748 (patch)
tree311ad2a818d2959fa9a3117d87f2b37c833acfa6 /fs/bcachefs/recovery.c
parentedfbba58e3e7a94900d24d266e6365b1ab531e3b (diff)
downloadlwn-ac958006294ab462848bc69b9b5ddb1a8b99e748.tar.gz
lwn-ac958006294ab462848bc69b9b5ddb1a8b99e748.zip
bcachefs: Factor out bch2_ec_stripes_heap_start()
This fixes a bug where mark and sweep gc incorrectly was clearing out the stripes heap and causing assertions to fire later - simpler to just create the stripes heap after gc has finished. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index c700b12b2ac0..8c67f1468945 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1125,6 +1125,8 @@ use_clean:
bch_verbose(c, "mark and sweep done");
}
+ bch2_stripes_heap_start(c);
+
clear_bit(BCH_FS_REBUILD_REPLICAS, &c->flags);
set_bit(BCH_FS_INITIAL_GC_DONE, &c->flags);