[LU-16760] "lfs find" support for fscrypt and other file attributes Created: 21/Apr/23 Updated: 28/Aug/23 Resolved: 24/Aug/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.2 |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | Sebastien Buisson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||
| Description |
|
Add support to "lfs find" to detect fscrypt files. It is not really clear that this fits into any of the existing search types, so a reasonable solution would be to add a new option like "[!] --attrs=[^]ATTR[,...]" argument that fetches the file attribute flags (FS_ENCRYPT_FL, FS_IMMUTABLE_FL, ...) that are already returned by statx() and then add logic to include/exclude files or directories with(out) those those attributes. |
| Comments |
| Comment by Andreas Dilger [ 21/Apr/23 ] |
|
It would also be useful to be able to print the file attribute flags with "-printf %La" or similar, and they would print a comma-separated list of named attribute flags, and hex value of any unknown attributes. |
| Comment by Andreas Dilger [ 21/Apr/23 ] |
|
I've also filed https://savannah.gnu.org/bugs/?64088 "find should support file attribute flags (immutable, append-only, fscrypt, etc.)" for upstream find, so that we might use the same option names, but I don't have high hopes on it getting implemented any time soon. |
| Comment by Gerrit Updater [ 04/Jul/23 ] |
|
"Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51562 |
| Comment by Gerrit Updater [ 24/Aug/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51562/ |
| Comment by Peter Jones [ 24/Aug/23 ] |
|
Landed for 2.16 |