summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/bcachefs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-04-17 23:30:49 +0200
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 23:09:32 +0200
commitc0960603e2d42d097fea4afd6b720619441061bd (patch)
tree075cb4958bc4111afc41077897393c082483157b /fs/bcachefs/bcachefs.h
parentbcachefs: Fix hash_check_key() (diff)
downloadlinux-c0960603e2d42d097fea4afd6b720619441061bd.tar.xz
linux-c0960603e2d42d097fea4afd6b720619441061bd.zip
bcachefs: Shutdown path improvements
We're seeing occasional firings of the assertion in the key cache shutdown code that nr_dirty == 0, which means we must sometimes be doing transaction commits after we've gone read only. Cleanups & changes: - BCH_FS_ALLOC_CLEAN renamed to BCH_FS_CLEAN_SHUTDOWN - new helper bch2_btree_interior_updates_flush(), which returns true if it had to wait - bch2_btree_flush_writes() now also returns true if there were btree writes in flight - __bch2_fs_read_only now checks if btree writes were in flight in the shutdown loop: btree write completion does a transaction update, to update the pointer in the parent node - assert that !BCH_FS_CLEAN_SHUTDOWN in __bch2_trans_commit Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/bcachefs.h')
-rw-r--r--fs/bcachefs/bcachefs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h
index 04d297b1da94..e7300a9f427c 100644
--- a/fs/bcachefs/bcachefs.h
+++ b/fs/bcachefs/bcachefs.h
@@ -494,7 +494,7 @@ struct bch_dev {
enum {
/* startup: */
- BCH_FS_ALLOC_CLEAN,
+ BCH_FS_CLEAN_SHUTDOWN,
BCH_FS_INITIAL_GC_DONE,
BCH_FS_INITIAL_GC_UNFIXED,
BCH_FS_TOPOLOGY_REPAIR_DONE,