]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bcachefs: bch2_inode_or_descendents_is_open()
authorKent Overstreet <kent.overstreet@linux.dev>
Thu, 3 Oct 2024 01:23:41 +0000 (21:23 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 9 Oct 2024 20:42:53 +0000 (16:42 -0400)
commit9d86178782a25fac105e550e1c29c7d3f8470116
tree6294fe77dbf4da190d440605e4fc0d551d074003
parent84878e82457f2d7900cc70041bd7c05684a6726e
bcachefs: bch2_inode_or_descendents_is_open()

fsck can now correctly check if inodes in interior snapshot nodes are
open/in use.

- Tweak the vfs inode rhashtable so that the subvolume ID isn't hashed,
  meaning inums in different subvolumes will hash to the same slot. Note
  that this is a hack, and will cause problems if anyone ever has the
  same file in many different snapshots open all at the same time.

- Then check if any of those subvolumes is a descendent of the snapshot
  ID being checked

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