Skip to content

Commit bcf77a0

Browse files
author
Kent Overstreet
committed
bcachefs: Fix hidden btree errors when reading roots
We silence btree errors in btree_node_scan, since it's probing and errors are expected: add a fake pass so that btree_node_scan is no longer recovery pass 0, and we don't think we're in btree node scan when reading btree roots. Signed-off-by: Kent Overstreet <[email protected]>
1 parent dc53718 commit bcf77a0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

fs/bcachefs/recovery_passes.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ const char * const bch2_recovery_passes[] = {
2727
NULL
2828
};
2929

30+
/* Fake recovery pass, so that scan_for_btree_nodes isn't 0: */
31+
static int bch2_recovery_pass_empty(struct bch_fs *c)
32+
{
33+
return 0;
34+
}
35+
3036
static int bch2_set_may_go_rw(struct bch_fs *c)
3137
{
3238
struct journal_keys *keys = &c->journal_keys;

fs/bcachefs/recovery_passes_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* must never change:
1414
*/
1515
#define BCH_RECOVERY_PASSES() \
16+
x(recovery_pass_empty, 41, PASS_SILENT) \
1617
x(scan_for_btree_nodes, 37, 0) \
1718
x(check_topology, 4, 0) \
1819
x(accounting_read, 39, PASS_ALWAYS) \

0 commit comments

Comments
 (0)