]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: bch2_btree_node_scrub()
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 30 Dec 2024 21:24:23 +0000 (16:24 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 15 Mar 2025 01:02:12 +0000 (21:02 -0400)
commit3e2ad29865f279f7e9837e4eeb8518509e97333f
tree8d53ec1eec842dc9729f147a64c28182e8f9f35a
parentca24130ee412d991ef9925bf1b507f973daa9740
bcachefs: bch2_btree_node_scrub()

Add a function for scrubbing btree nodes - reading them in, and kicking
off a rewrite if there's an error.

The btree_node_read_done() checks have to be duplicated because we're
not using a pointer to a struct btree - the btree node might already be
in cache, and we need to check a specific replica, which might not be
the one we previously read from.

This will be used in the next patch implementing high-level scrub.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_io.c
fs/bcachefs/btree_io.h
fs/bcachefs/errcode.h