[LU-16494] Check fileset for operations by fid Created: 19/Jan/23  Updated: 25/Apr/23  Resolved: 14/Feb/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.16.0
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Sebastien Buisson Assignee: Sebastien Buisson
Resolution: Fixed Votes: 0
Labels: patch, sec

Issue Links:
Related
is related to LU-8585 All Lustre test suites should pass wi... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

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.



 Comments   
Comment by Gerrit Updater [ 19/Jan/23 ]

"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49696
Subject: LU-16494 fileset: check fileset for operations by fid
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 77bdcc905df478bc844444b4c5150f519bcab634

Comment by Alex Zhuravlev [ 19/Jan/23 ]

IMO, this kills the idea of a cheap way to remove files skipping full path traversal.

Comment by Sebastien Buisson [ 20/Jan/23 ]

That is indeed a drawback of this new capability. But because of DNE, this fileset check cannot be done on server side, as the full path to the subdirectory used as client fileset can be "spread" across multiple MDTs.
Please note that in order to mitigate this drawback, the capability is disabled by default, and can be enabled per client mount point.

Comment by Alex Zhuravlev [ 20/Jan/23 ]

filesets aren't totally isolated, right? we can't really prevent, for example, hardlinks between filesets?

Comment by Sebastien Buisson [ 20/Jan/23 ]

In a subdirectory mount, you can indeed have a file that has a hard link outside of the subdirectory mount. But I can see no problem with that. And if a file inside a subdirectory mount is a soft link to a file outside of the subdirectory mount, then the link cannot be followed.

Comment by Alex Zhuravlev [ 20/Jan/23 ]

I'm not saying hardlinks is a problem, but I tend to think that given the filesets aren't totally isolated means that we probably don't need that check in rmfid.

Comment by Gerrit Updater [ 27/Jan/23 ]

"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49802
Subject: LU-16494 fileset: debug patch
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7bfac333e772f0c525c8c312152e2be5da179542

Comment by James A Simmons [ 27/Jan/23 ]

Site which want isolation of data sets will not use filesets if they are not totally isolated.

Comment by Gerrit Updater [ 14/Feb/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49696/
Subject: LU-16494 fileset: check fileset for operations by fid
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 9a72c073d33b0454229402c0cc930dc4e796107b

Comment by Peter Jones [ 14/Feb/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:27:30 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.