[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7b6aa90f-79dc-443a-8e5f-3c9b88892271@app.fastmail.com>
Date: Wed, 14 Jan 2026 14:01:14 -0500
From: "Chuck Lever" <cel@...nel.org>
To: "Jan Kara" <jack@...e.cz>
Cc: vira@...p.suse.de, "Christian Brauner" <brauner@...nel.org>,
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-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 v4 01/16] fs: Add case sensitivity info to file_kattr
On Wed, Jan 14, 2026, at 1:11 PM, Jan Kara wrote:
> On Wed 14-01-26 09:28:44, Chuck Lever wrote:
>> From: Chuck Lever <chuck.lever@...cle.com>
>>
>> Enable upper layers such as NFSD to retrieve case sensitivity
>> information from file systems by adding case_insensitive and
>> case_nonpreserving boolean fields to struct file_kattr.
>>
>> These fields default to false (POSIX semantics: case-sensitive and
>> case-preserving), allowing filesystems to set them only when
>> behavior differs from the default.
>>
>> Signed-off-by: Chuck Lever <chuck.lever@...cle.com>
> ...
>> diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h
>> index 66ca526cf786..07286d34b48b 100644
>> --- a/include/uapi/linux/fs.h
>> +++ b/include/uapi/linux/fs.h
>> @@ -229,10 +229,20 @@ struct file_attr {
>> __u32 fa_nextents; /* nextents field value (get) */
>> __u32 fa_projid; /* project identifier (get/set) */
>> __u32 fa_cowextsize; /* CoW extsize field value (get/set) */
>> + /* VER1 additions: */
>> + __u32 fa_case_behavior; /* case sensitivity (get) */
>> + __u32 fa_reserved;
>> };
>>
>> #define FILE_ATTR_SIZE_VER0 24
>> -#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER0
>> +#define FILE_ATTR_SIZE_VER1 32
>> +#define FILE_ATTR_SIZE_LATEST FILE_ATTR_SIZE_VER1
>> +
>> +/*
>> + * Case sensitivity flags for fa_case_behavior
>> + */
>> +#define FS_CASE_INSENSITIVE 0x00000001 /* case-insensitive lookups */
>> +#define FS_CASE_NONPRESERVING 0x00000002 /* case not preserved */
>
> This is a matter of taste so not sure what others think about it but
> file_attr already have fa_xflags field and there is already one flag which
> doesn't directly correspond to on-disk representation (FS_XFLAG_HASATTR) so
> we could also put the two new flags in there... I have hard time imagining
> fa_case_behavior would grow past the two flags you've introduced so u32
> seems a bit wasteful.
No problem. I'll wait for additional guidance on this.
--
Chuck Lever
Powered by blists - more mailing lists