summaryrefslogtreecommitdiffstats
path: root/fs/fat
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-03-23 19:29:19 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-31 20:36:11 -0400
commit79032b078173f87a13f8618cdab710798be67314 (patch)
treeca391624dd45f210f1b0d1811ab9147a8bc60f93 /fs/fat
parent40cb26233a060aeb936de7ea1f6ac2659ed9951c (diff)
downloadlinux-stable-79032b078173f87a13f8618cdab710798be67314.tar.gz
linux-stable-79032b078173f87a13f8618cdab710798be67314.tar.bz2
linux-stable-79032b078173f87a13f8618cdab710798be67314.zip
bcachefs: Improved topology repair checks
Consolidate bch2_gc_check_topology() and btree_node_interior_verify(), and replace them with an improved version, bch2_btree_node_check_topology(). This checks that children of an interior node correctly span the full range of the parent node with no overlaps. Also, ensure that topology repairs at runtime are always a fatal error; in particular, this adds a check in btree_iter_down() - if we don't find a key while walking down the btree that's indicative of a topology error and should be flagged as such, not a null ptr deref. Some checks in btree_update_interior.c remaining BUG_ONS(), because we already checked the node for topology errors when starting the update, and the assertions indicate that we _just_ corrupted the btree node - i.e. the problem can't be that existing on disk corruption, they indicate an actual algorithmic bug. In the future, we'll be annotating the fsck errors list with which recovery pass corrects them; the open coded "run explicit recovery pass or fatal error" in bch2_btree_node_check_topology() will in the future be done for every fsck_err() call. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/fat')
0 files changed, 0 insertions, 0 deletions