Commit 0953450a authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Mark recovery passses that are safe to run online

Online fsck is coming, and many of our recovery/fsck passes are already
safe to run while the filesystem is in use - mark which ones.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 2b41226d
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define PASS_FSCK BIT(1) #define PASS_FSCK BIT(1)
#define PASS_UNCLEAN BIT(2) #define PASS_UNCLEAN BIT(2)
#define PASS_ALWAYS BIT(3) #define PASS_ALWAYS BIT(3)
#define PASS_ONLINE BIT(4)
/* /*
* Passes may be reordered, but the second field is a persistent identifier and * Passes may be reordered, but the second field is a persistent identifier and
...@@ -22,18 +23,18 @@ ...@@ -22,18 +23,18 @@
x(fs_journal_alloc, 7, PASS_ALWAYS|PASS_SILENT) \ x(fs_journal_alloc, 7, PASS_ALWAYS|PASS_SILENT) \
x(set_may_go_rw, 8, PASS_ALWAYS|PASS_SILENT) \ x(set_may_go_rw, 8, PASS_ALWAYS|PASS_SILENT) \
x(journal_replay, 9, PASS_ALWAYS) \ x(journal_replay, 9, PASS_ALWAYS) \
x(check_alloc_info, 10, PASS_FSCK) \ x(check_alloc_info, 10, PASS_ONLINE|PASS_FSCK) \
x(check_lrus, 11, PASS_FSCK) \ x(check_lrus, 11, PASS_ONLINE|PASS_FSCK) \
x(check_btree_backpointers, 12, PASS_FSCK) \ x(check_btree_backpointers, 12, PASS_ONLINE|PASS_FSCK) \
x(check_backpointers_to_extents, 13, PASS_FSCK) \ x(check_backpointers_to_extents, 13, PASS_ONLINE|PASS_FSCK) \
x(check_extents_to_backpointers, 14, PASS_FSCK) \ x(check_extents_to_backpointers, 14, PASS_ONLINE|PASS_FSCK) \
x(check_alloc_to_lru_refs, 15, PASS_FSCK) \ x(check_alloc_to_lru_refs, 15, PASS_ONLINE|PASS_FSCK) \
x(fs_freespace_init, 16, PASS_ALWAYS|PASS_SILENT) \ x(fs_freespace_init, 16, PASS_ALWAYS|PASS_SILENT) \
x(bucket_gens_init, 17, 0) \ x(bucket_gens_init, 17, 0) \
x(check_snapshot_trees, 18, PASS_FSCK) \ x(check_snapshot_trees, 18, PASS_ONLINE|PASS_FSCK) \
x(check_snapshots, 19, PASS_FSCK) \ x(check_snapshots, 19, PASS_ONLINE|PASS_FSCK) \
x(check_subvols, 20, PASS_FSCK) \ x(check_subvols, 20, PASS_ONLINE|PASS_FSCK) \
x(delete_dead_snapshots, 21, PASS_FSCK) \ x(delete_dead_snapshots, 21, PASS_ONLINE|PASS_FSCK) \
x(fs_upgrade_for_subvolumes, 22, 0) \ x(fs_upgrade_for_subvolumes, 22, 0) \
x(resume_logged_ops, 23, PASS_ALWAYS) \ x(resume_logged_ops, 23, PASS_ALWAYS) \
x(check_inodes, 24, PASS_FSCK) \ x(check_inodes, 24, PASS_FSCK) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment