From: "Chuck Lever" <cel@kernel.org>
To: "Jan Kara" <jack@suse.cz>
Cc: "Alexander Viro" <viro@zeniv.linux.org.uk>,
"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-api@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>,
"John Paul Adrian Glaubitz" <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>,
"Darrick J. Wong" <djwong@kernel.org>,
"Roland Mainz" <roland.mainz@nrubsig.org>,
"Steve French" <stfrench@microsoft.com>
Subject: Re: [PATCH v11 00/15] Exposing case folding behavior
Date: Mon, 27 Apr 2026 09:30:28 -0400 [thread overview]
Message-ID: <af3f7518-7501-4c25-9bbc-a8fc8cdb4e29@app.fastmail.com> (raw)
In-Reply-To: <yc7ygk6w6zvf46arzzvmxnuoqjrni2dtlhmywaivzmvfxnilf3@xv7tthtrowns>
On Mon, Apr 27, 2026, at 6:55 AM, Jan Kara wrote:
> On Fri 24-04-26 21:53:02, Chuck Lever wrote:
>> Changes since v10:
>> - cifs: Source case-handling flags from the server's cached
>> FS_ATTRIBUTE_INFORMATION reply instead of the nocase mount
>> option, with a nocase fallback when the reply is absent
>> - Address findings from sashiko(gemini-3) and gpt-5.5:
>> - nfs: Skip pathconf case bits on NFSv4 (set via FATTR4_CASE_*
>> instead)
>> - xfs: Hide FS_CASEFOLD_FL from the legacy flags view so
>> chattr round-trips do not hit the setflags whitelist
>> - ext4, f2fs: Drop redundant fileattr_get patches; the
>> FS_CASEFOLD_FL translation in fileattr_fill_flags() already
>> reports FS_XFLAG_CASEFOLD for casefolded directories
>
> Err, how is this supposed to work? I wasn't able to find any code
> transforming S_CASEFOLDED inode flag into FS_CASEFOLD_FL on fileattr_get
> path. Sure, fileattr_fill_flags() takes care of setting FS_XFLAG_CASEFOLD
> once FS_CASEFOLD_FL is set. What am I missing?
Agreed, that is a little surprising.
The path does not go through S_CASEFOLD. Both filesystems
report FS_CASEFOLD_FL straight from their on-disk flag word.
For ext4, EXT4_CASEFOLD_FL is 0x40000000, the same bit value
as FS_CASEFOLD_FL, and it is included in EXT4_FL_USER_VISIBLE.
ext4_iget() loads it into ei->i_flags directly from
raw_inode->i_flags (fs/ext4/inode.c:5358). ext4_fileattr_get()
then masks with EXT4_FL_USER_VISIBLE and hands the result to
fileattr_fill_flags(), which translates FS_CASEFOLD_FL into
FS_XFLAG_CASEFOLD on the way out.
For f2fs, f2fs_fileattr_get() runs fi->i_flags through
f2fs_iflags_to_fsflags(), whose mapping table has an explicit
{ F2FS_CASEFOLD_FL, FS_CASEFOLD_FL } entry (fs/f2fs/file.c:2205).
F2FS_GETTABLE_FS_FL includes FS_CASEFOLD_FL, so
fileattr_fill_flags() again lights up FS_XFLAG_CASEFOLD.
S_CASEFOLD is a separate VFS-level cache that
ext4_set_inode_flags() and f2fs's equivalent set at iget
time; nothing on the fileattr_get path consults it.
For reference, the original observation about the manual
assignment being redundant came from sashiko's review of v10:
https://sashiko.dev/#/patchset/20260423-case-sensitivity-v10-0-c385d674a6cf%40oracle.com?part=8
https://sashiko.dev/#/patchset/20260423-case-sensitivity-v10-0-c385d674a6cf%40oracle.com?part=12
--
Chuck Lever
next prev parent reply other threads:[~2026-04-27 13:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 1:53 [PATCH v11 00/15] Exposing case folding behavior Chuck Lever
2026-04-25 1:53 ` [PATCH v11 01/15] fs: Move file_kattr initialization to callers Chuck Lever
2026-04-25 1:53 ` [PATCH v11 02/15] fs: Add case sensitivity flags to file_kattr Chuck Lever
2026-04-25 1:53 ` [PATCH v11 03/15] fat: Implement fileattr_get for case sensitivity Chuck Lever
2026-04-25 1:53 ` [PATCH v11 04/15] exfat: " Chuck Lever
2026-04-25 1:53 ` [PATCH v11 05/15] ntfs3: " Chuck Lever
2026-04-25 1:53 ` [PATCH v11 06/15] hfs: " Chuck Lever
2026-04-25 1:53 ` [PATCH v11 07/15] hfsplus: Report case sensitivity in fileattr_get Chuck Lever
2026-04-25 1:53 ` [PATCH v11 08/15] xfs: " Chuck Lever
2026-04-27 15:56 ` Darrick J. Wong
2026-04-25 1:53 ` [PATCH v11 09/15] cifs: Implement fileattr_get for case sensitivity Chuck Lever
2026-04-25 1:53 ` [PATCH v11 10/15] nfs: " Chuck Lever
2026-04-25 1:53 ` [PATCH v11 11/15] vboxsf: " Chuck Lever
2026-04-25 1:53 ` [PATCH v11 12/15] isofs: " Chuck Lever
2026-04-27 10:44 ` Jan Kara
2026-04-27 12:02 ` Lionel Cons
2026-04-27 13:30 ` Jan Kara
2026-04-25 1:53 ` [PATCH v11 13/15] nfsd: Report export case-folding via NFSv3 PATHCONF Chuck Lever
2026-04-25 1:53 ` [PATCH v11 14/15] nfsd: Implement NFSv4 FATTR4_CASE_INSENSITIVE and FATTR4_CASE_PRESERVING Chuck Lever
2026-04-25 1:53 ` [PATCH v11 15/15] ksmbd: Report filesystem case sensitivity via FS_ATTRIBUTE_INFORMATION Chuck Lever
2026-04-27 10:55 ` [PATCH v11 00/15] Exposing case folding behavior Jan Kara
2026-04-27 13:30 ` Chuck Lever [this message]
2026-04-27 15:30 ` Jan Kara
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=af3f7518-7501-4c25-9bbc-a8fc8cdb4e29@app.fastmail.com \
--to=cel@kernel.org \
--cc=adilger.kernel@dilger.ca \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=anna@kernel.org \
--cc=brauner@kernel.org \
--cc=cem@kernel.org \
--cc=chao@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=djwong@kernel.org \
--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-api@vger.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=roland.mainz@nrubsig.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=stfrench@microsoft.com \
--cc=trondmy@kernel.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--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