Commit bcf77a05 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

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: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent dc537189
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -27,6 +27,12 @@ const char * const bch2_recovery_passes[] = {
	NULL
};

/* Fake recovery pass, so that scan_for_btree_nodes isn't 0: */
static int bch2_recovery_pass_empty(struct bch_fs *c)
{
	return 0;
}

static int bch2_set_may_go_rw(struct bch_fs *c)
{
	struct journal_keys *keys = &c->journal_keys;
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
 * must never change:
 */
#define BCH_RECOVERY_PASSES()							\
	x(recovery_pass_empty,			41, PASS_SILENT)		\
	x(scan_for_btree_nodes,			37, 0)				\
	x(check_topology,			 4, 0)				\
	x(accounting_read,			39, PASS_ALWAYS)		\