public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Chuck Lever <cel@kernel.org>
Cc: Jan Kara <jack@suse.cz>,
	vira@imap.suse.de, Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-xfs@vger.kernel.org, linux-cifs@vger.kernel.org,
	linux-nfs@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
	Namjae Jeon <linkinjeon@kernel.org>,
	Sungjong Seo <sj1557.seo@samsung.com>,
	Yuezhang Mo <yuezhang.mo@sony.com>,
	almaz.alexandrovich@paragon-software.com,
	Viacheslav Dubeyko <slava@dubeyko.com>,
	glaubitz@physik.fu-berlin.de, frank.li@vivo.com,
	Theodore Tso <tytso@mit.edu>,
	adilger.kernel@dilger.ca, Carlos Maiolino <cem@kernel.org>,
	Steve French <sfrench@samba.org>,
	Paulo Alcantara <pc@manguebit.org>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
	Hans de Goede <hansg@kernel.org>,
	senozhatsky@chromium.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v4 01/16] fs: Add case sensitivity info to file_kattr
Date: Wed, 14 Jan 2026 12:01:30 -0800	[thread overview]
Message-ID: <20260114200130.GJ15551@frogsfrogsfrogs> (raw)
In-Reply-To: <7b6aa90f-79dc-443a-8e5f-3c9b88892271@app.fastmail.com>

On Wed, Jan 14, 2026 at 02:01:14PM -0500, Chuck Lever wrote:
> 
> 
> 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@oracle.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@oracle.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.

Sounds like a better use of space in struct file_attr than adding
another pair of u32.

--D

> 
> -- 
> Chuck Lever
> 

  reply	other threads:[~2026-01-14 20:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-14 14:28 [PATCH v4 00/16] Exposing case folding behavior Chuck Lever
2026-01-14 14:28 ` [PATCH v4 01/16] fs: Add case sensitivity info to file_kattr Chuck Lever
2026-01-14 18:11   ` Jan Kara
2026-01-14 19:01     ` Chuck Lever
2026-01-14 20:01       ` Darrick J. Wong [this message]
2026-01-15  8:29         ` Christian Brauner
2026-01-14 14:28 ` [PATCH v4 02/16] fat: Implement fileattr_get for case sensitivity Chuck Lever
2026-01-15  8:58   ` OGAWA Hirofumi
2026-01-14 14:28 ` [PATCH v4 03/16] exfat: " Chuck Lever
2026-01-14 14:28 ` [PATCH v4 04/16] ntfs3: " Chuck Lever
2026-01-14 14:28 ` [PATCH v4 05/16] hfs: " Chuck Lever
2026-01-14 14:28 ` [PATCH v4 06/16] hfsplus: Report case sensitivity in fileattr_get Chuck Lever
2026-01-14 14:28 ` [PATCH v4 07/16] ext4: " Chuck Lever
2026-01-14 14:28 ` [PATCH v4 08/16] xfs: " Chuck Lever
2026-01-14 14:28 ` [PATCH v4 09/16] cifs: Implement fileattr_get for case sensitivity Chuck Lever
2026-01-14 14:28 ` [PATCH v4 10/16] nfs: " Chuck Lever
2026-01-14 14:28 ` [PATCH v4 11/16] f2fs: Add case sensitivity reporting to fileattr_get Chuck Lever
2026-01-14 14:28 ` [PATCH v4 12/16] vboxsf: Implement fileattr_get for case sensitivity Chuck Lever
2026-01-14 14:28 ` [PATCH v4 13/16] isofs: " Chuck Lever
2026-01-14 14:28 ` [PATCH v4 14/16] nfsd: Report export case-folding via NFSv3 PATHCONF Chuck Lever
2026-01-14 14:28 ` [PATCH v4 15/16] nfsd: Implement NFSv4 FATTR4_CASE_INSENSITIVE and FATTR4_CASE_PRESERVING Chuck Lever
2026-01-14 14:28 ` [PATCH v4 16/16] ksmbd: Report filesystem case sensitivity via FS_ATTRIBUTE_INFORMATION Chuck Lever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260114200130.GJ15551@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=adilger.kernel@dilger.ca \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=anna@kernel.org \
    --cc=brauner@kernel.org \
    --cc=cel@kernel.org \
    --cc=cem@kernel.org \
    --cc=chao@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=frank.li@vivo.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=hansg@kernel.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jack@suse.cz \
    --cc=jaegeuk@kernel.org \
    --cc=linkinjeon@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=pc@manguebit.org \
    --cc=ronniesahlberg@gmail.com \
    --cc=senozhatsky@chromium.org \
    --cc=sfrench@samba.org \
    --cc=sj1557.seo@samsung.com \
    --cc=slava@dubeyko.com \
    --cc=sprasad@microsoft.com \
    --cc=trondmy@kernel.org \
    --cc=tytso@mit.edu \
    --cc=vira@imap.suse.de \
    --cc=yuezhang.mo@sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox