summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-08-04 23:10:08 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:43 -0400
commit9f115ce9e9b57f0e55a37b657feac5663590b85e (patch)
tree65dddaeb3ee4992d45872e719be98bba2207ed0e /fs/bcachefs/recovery.c
parent00c24f53b563dafb2de8c5f642d24ac775b4479c (diff)
downloadlwn-9f115ce9e9b57f0e55a37b657feac5663590b85e.tar.gz
lwn-9f115ce9e9b57f0e55a37b657feac5663590b85e.zip
bcachefs: Fix a bug with the journal_seq_blacklist mechanism
Previously, we would start doing btree updates before writing the first journal entry; if this was after an unclean shutdown, this could cause those btree updates to not be blacklisted. Also, move some code to headers for userspace debug tools. 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 28972f30e198..6e829bf0a31f 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -1039,6 +1039,11 @@ int bch2_fs_recovery(struct bch_fs *c)
}
journal_seq += 4;
+
+ /*
+ * The superblock needs to be written before we do any btree
+ * node writes: it will be in the read_write() path
+ */
}
ret = bch2_blacklist_table_initialize(c);