Whamcloud - gitweb
LU-16494 fileset: check fileset for operations by fid 96/49696/8
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 19 Jan 2023 17:07:27 +0000 (18:07 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 14 Feb 2023 06:05:00 +0000 (06:05 +0000)
commit9a72c073d33b0454229402c0cc930dc4e796107b
tree9d31df44558c2868d4d51e65538d2308eb7b8eb5
parenta2de6af65d21bff0d9357c30e6eb4ba049ff2059
LU-16494 fileset: check fileset for operations by fid

Some operations by FID, such as lfs rmfid, must be aware of
subdirectory mount (fileset) so that they do not operate on files
that are outside of the namespace currently mounted by the client.

For lfs rmfid, we first proceed to a fid2path resolution. As fid2path
is already fileset aware, it fails if a file or a link to a file is
outside of the subdirectory mount. So we carry on with rmfid only
for FIDs for which the file and all links do appear under the
current fileset.

This new behavior is enabled as soon as we detect a subdirectory mount
is done (either directly or imposed by a nodemap fileset). This means
the new behavior does not impact normal, whole-namespace client mount.

sanity test_421h is added to exercise this new capability.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I47136ac0a3324b9afdd01b0f902abc37938bd361
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49696
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_export.h
lustre/llite/dir.c
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/mdt/mdt_handler.c
lustre/obdclass/genops.c
lustre/tests/sanity.sh