[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <95aa2a65-e1e8-44ef-a62a-e3190a11cb32@app.fastmail.com>
Date: Fri, 23 Jan 2026 10:49:38 -0500
From: "Chuck Lever" <cel@...nel.org>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: "Alexander Viro" <viro@...iv.linux.org.uk>,
"Christian Brauner" <brauner@...nel.org>, "Jan Kara" <jack@...e.cz>,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-cifs@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-api@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
"OGAWA Hirofumi" <hirofumi@...l.parknet.co.jp>,
"Namjae Jeon" <linkinjeon@...nel.org>,
"Sungjong Seo" <sj1557.seo@...sung.com>,
"Yuezhang Mo" <yuezhang.mo@...y.com>,
almaz.alexandrovich@...agon-software.com,
"Viacheslav Dubeyko" <slava@...eyko.com>, glaubitz@...sik.fu-berlin.de,
frank.li@...o.com, "Theodore Tso" <tytso@....edu>,
adilger.kernel@...ger.ca, "Carlos Maiolino" <cem@...nel.org>,
"Steve French" <sfrench@...ba.org>, "Paulo Alcantara" <pc@...guebit.org>,
"Ronnie Sahlberg" <ronniesahlberg@...il.com>,
"Shyam Prasad N" <sprasad@...rosoft.com>,
"Trond Myklebust" <trondmy@...nel.org>,
"Anna Schumaker" <anna@...nel.org>, "Jaegeuk Kim" <jaegeuk@...nel.org>,
"Chao Yu" <chao@...nel.org>, "Hans de Goede" <hansg@...nel.org>,
senozhatsky@...omium.org, "Chuck Lever" <chuck.lever@...cle.com>
Subject: Re: [PATCH v7 07/16] ext4: Report case sensitivity in fileattr_get
On Thu, Jan 22, 2026, at 7:29 PM, Darrick J. Wong wrote:
> On Thu, Jan 22, 2026 at 11:03:02AM -0500, Chuck Lever wrote:
>> From: Chuck Lever <chuck.lever@...cle.com>
>>
>> Report ext4's case sensitivity behavior via the FS_XFLAG_CASEFOLD
>> flag. ext4 always preserves case at rest.
>>
>> Case sensitivity is a per-directory setting in ext4. If the queried
>> inode is a casefolded directory, report case-insensitive; otherwise
>> report case-sensitive (standard POSIX behavior).
>>
>> Reviewed-by: Jan Kara <jack@...e.cz>
>> Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
>> ---
>> fs/ext4/ioctl.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
>> index 7ce0fc40aec2..462da7aadc80 100644
>> --- a/fs/ext4/ioctl.c
>> +++ b/fs/ext4/ioctl.c
>> @@ -996,6 +996,13 @@ int ext4_fileattr_get(struct dentry *dentry, struct file_kattr *fa)
>> if (ext4_has_feature_project(inode->i_sb))
>> fa->fsx_projid = from_kprojid(&init_user_ns, ei->i_projid);
>>
>> + /*
>> + * Case folding is a directory attribute in ext4. Set FS_XFLAG_CASEFOLD
>> + * for directories with the casefold attribute; all other inodes use
>> + * standard case-sensitive semantics.
>> + */
>> + if (IS_CASEFOLDED(inode))
>> + fa->fsx_xflags |= FS_XFLAG_CASEFOLD;
>
> Curious. Shouldn't the VFS set FS_XFLAG_CASEFOLD if the VFS casefolding
> flag is set?
>
> OTOH, there are more filesystems that apparently support casefolding
> (given the size of this patchset) than actually set S_CASEFOLD. I think
> I'm ignorant of something here...
I'm not clear if there's a review action needed. Help?
--
Chuck Lever
Powered by blists - more mailing lists