]> git.dujemihanovic.xyz Git - linux.git/commit
bcachefs: Check for unlinked inodes with dirents
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 30 Sep 2024 02:38:04 +0000 (22:38 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sat, 5 Oct 2024 00:25:32 +0000 (20:25 -0400)
commitc7da5ee2e5cc30faca49e3ea9dbecf8f6ee4f1ea
tree1f5019f27a2ef31a1c5afa803df1d5d7f529aaa7
parent1c6051bbd76b2767d6acef6a1d0bdf99aa319273
bcachefs: Check for unlinked inodes with dirents

link count works differently in bcachefs - it's only nonzero for files
with multiple hardlinks, which means we can also avoid checking it
except for files that are known to have hardlinks.

That means we need a few different checks instead; in particular, we
don't want fsck to delet a file that has a dirent pointing to it.

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