[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch #9754] find: new '-attr' predicate to test inode flags

From: Matt Whitlock
Subject: [patch #9754] find: new '-attr' predicate to test inode flags
Date: Tue, 23 Apr 2019 00:01:50 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36

Follow-up Comment #2, patch #9754 (project findutils):

Inode flags are not specific to Linux's Extended File System, but they _are_
specific to Linux. They were lifted from Ext to Linux's (filesystem-agnostic)
VFS layer because they're used by multiple file system implementations. The
following note from <linux/fs.h> may be instructive:

 * Note: for historical reasons, these flags were originally used and
 * defined for use by ext2/ext3, and then other file systems started
 * using these flags so they wouldn't need to write their own version
 * of chattr/lsattr (which was shipped as part of e2fsprogs).

As it happens, I mostly use these flags on XFS volumes.

Regarding the "Casefold" and "Verity" flags you mentioned, I do not see these
in the <linux/fs.h> header. I would guess that they are specific to Ext and
are accessed by filesystem-specific APIs. If they are ever promoted to the VFS
layer, then it might make sense to add them to Find.

I have added an Autoconf check and preprocessor guard directives so that -attr
is implemented only on systems with a working <linux/fs.h> header.

I do not see the code style warnings that you quoted, but I have incorporated
fixes that should eliminate them.

I am indeed willing to assign copyrights for my contribution to the Free
Software Foundation.

(file #46811)

Additional Item Attachment:

File name: 0002-find-support-attr-only-if-OS-supports-inode-flags.patch
Size:13 KB


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]