bcachefs: Subvol dirents are now only visible in parent subvol
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 12 Oct 2021 16:06:02 +0000 (12:06 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:14 +0000 (17:09 -0400)
commit4db650277d42c0c80cde8fa3571ff1fb2fded8d9
tree69697c049166bd3211c3b7266702ca8ee0d8b909
parente5fa91d7ac88ac6a8385c14dbc8dcbe1a053e62f
bcachefs: Subvol dirents are now only visible in parent subvol

This changes the on disk format for dirents that point to subvols so
that they also record the subvolid of the parent subvol, so that we can
filter them out in other subvolumes.

This also updates the dirent code to do that filtering, and in
particular tweaks the rename code - we need to ensure that there's only
ever one dirent (counting multiplicities in different snapshots) that
point to a subvolume.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/bcachefs_format.h
fs/bcachefs/dirent.c
fs/bcachefs/dirent.h
fs/bcachefs/fsck.c
fs/bcachefs/recovery.c
fs/bcachefs/str_hash.h