]> Gentwo Git Trees - linux/.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>
Mon, 24 Feb 2025 04:35:34 +0000 (23:35 -0500)
commit23093720698132bd8ceb012782933d871baabb98
treee2aae7886dbbe9e139bec6452218db2ea4c2398e
parentc60e1e957db3b63fd3640831b788fedea32b47be
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