bcachefs: Subvolumes may now be renamed
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 21 Jan 2024 21:46:45 +0000 (16:46 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 10 Mar 2024 19:34:08 +0000 (15:34 -0400)
commit7f76b08acac4b41bd4bf1670470dd0770d61d0b9
tree31a20a145100ee982b3b9a2700ff13731f1d8563
parent5f43b0134e40bd798ba0999a11e90f24a0c65a51
bcachefs: Subvolumes may now be renamed

Files within a subvolume cannot be renamed into another subvolume, but
subvolumes themselves were intended to be.

This implements subvolume renaming - we need to ensure that there's only
a single dirent that points to a subvolume key (not multiple versions in
different snapshots), and we need to ensure that dirent.d_parent_subol
and inode.bi_parent_subvol are updated.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/dirent.c
fs/bcachefs/fs-common.c