From: Chuck Lever <chuck.lever@oracle.com>
To: Jeff Layton <jlayton@kernel.org>,
Cedric Blancher <cedric.blancher@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: NFSv4.x export options to mark export as case-insensitive, case-preserving? Re: LInux NFSv4.1 client and server- case insensitive filesystems supported?
Date: Wed, 10 Sep 2025 10:35:20 -0400 [thread overview]
Message-ID: <118e8e22-39f8-4cb8-87c8-81637ca280e2@oracle.com> (raw)
In-Reply-To: <72dff4694962ff72dec90e4071ef993134dfae27.camel@kernel.org>
On 9/10/25 10:30 AM, Jeff Layton wrote:
> On Wed, 2025-09-10 at 10:14 -0400, Chuck Lever wrote:
>> On 9/10/25 7:10 AM, Jeff Layton wrote:
>>> On Tue, 2025-09-09 at 18:06 +0200, Cedric Blancher wrote:
>>>> On Tue, 10 Jun 2025 at 07:34, Christoph Hellwig <hch@infradead.org> wrote:
>>>>>
>>>>> On Mon, Jun 09, 2025 at 10:16:24AM -0400, Chuck Lever wrote:
>>>>>>> Date: Wed May 21 16:50:46 2008 +1000
>>>>>>>
>>>>>>> dcache: Add case-insensitive support d_ci_add() routine
>>>>>>
>>>>>> My memory must be quite faulty then. I remember there being significant
>>>>>> controversy at the Park City LSF around some patches adding support for
>>>>>> case insensitivity. But so be it -- I must not have paid terribly close
>>>>>> attention due to lack of oxygen.
>>>>>
>>>>> Well, that is when the ext4 CI code landed, which added the unicode
>>>>> normalization, and with that another whole bunch of issues.
>>>>
>>>> Well, no one likes the Han unification, and the mess the Unicode
>>>> consortium made from that,
>>>> But the Chinese are working on a replacement standard for Unicode, so
>>>> that will be a lot of FUN =:-)
>>>>
>>>>>>> That being said no one ever intended any of these to be exported over
>>>>>>> NFS, and I also question the sanity of anyone wanting to use case
>>>>>>> insensitive file systems over NFS.
>>>>>>
>>>>>> My sense is that case insensitivity for NFS exports is for Windows-based
>>>>>> clients
>>>>>
>>>>> I still question the sanity of anyone using a Windows NFS client in
>>>>> general, but even more so on a case insensitive file system :)
>>>>
>>>> Well, if you want one and the same homedir on both Linux and Windows,
>>>> then you have the option between the SMB/CIFS and the Windows NFSv4.2
>>>> driver (I'm not counting the Windows NFSv3 driver due lack of ACL
>>>> support).
>>>> Both, as of September 2025, work fine for us for production usage.
>>>>
>>>>>> Does it, for example, make sense for NFSD to query the file system
>>>>>> on its case sensitivity when it prepares an NFSv3 PATHCONF response?
>>>>>> Or perhaps only for NFSv4, since NFSv4 pretends to have some recognition
>>>>>> of internationalized file names?
>>>>>
>>>>> Linus hates pathconf any anything like it with passion. Altough we
>>>>> basically got it now with statx by tacking it onto a fast path
>>>>> interface instead, which he now obviously also hates. But yes, nfsd
>>>>> not beeing able to query lots of attributes, including actual important
>>>>> ones is largely due to the lack of proper VFS interfaces.
>>>>
>>>> What does Linus recommend as an alternative to pathconf()?
>>>>
>>>> Also, AGAIN the question:
>>>> Due lack of a VFS interface and the urgend use case of needing to
>>>> export a case-insensitive filesystem via NFSv4.x, could we please get
>>>> two /etc/exports options, one setting the case-insensitive boolean
>>>> (true, false, get-default-from-fs) and one for case-preserving (true,
>>>> false, get-default-from-fs)?
>>>>
>>>> So far LInux nfsd does the WRONG thing here, and exports even
>>>> case-insensitive filesystems as case-sensitive. The Windows NFSv4.1
>>>> server does it correctly.
>>>>
>>>> Ced
>>>
>>> I think you don't want an export option for this.
>>>
>>> It sounds like what we really need is a mechanism to determine whether
>>> the inode the client is doing a GETATTR against lies on a case-
>>> insensitive mount.
>>>
>>> Is there a way to detect that in the kernel?
>>
>> Agreed, I would prefer something automatic rather than an explicit
>> export option. The best approach is to set this behavior on the
>> underlying file system via its mount options or on-disk settings.
>> That way, remote and local users see the exact same CS behavior.
>>
>> An export option would enable NFSD to lie about case sensitivity.
>> Maybe that's what is needed? I don't really know. It seems like
>> a potential interoperability disaster.
>>
>
> There is also the issue that exports can span filesystems. If you have
> one fs that is case-sensitive mounted on another that is not, and then
> you export the whole mess, the results sound sketchy.
>
>> Moreover, as we determined the last time this thread was active,
>> ext4 has a per-directory case insensitivity setting. The NFS
>> protocol's CS attribute is per file system. That's a giant mismatch
>> in semantics, and I don't know what to do about that. An export
>> option would basically override all of that -- as a hack -- but
>> would get us moving forward. Again, perhaps there are some
>> significant risks to this approach.
>>
>
> The spec is written such that case-sensitivity applies to the whole fs,
> but in practical terms, would there be any harm in allowing this to be
> set more granularly?
>
> Existing servers would still work fine in that case, and I don't think
> it would be an issue for the Linux client at least.
Yep, the issue is how existing NFS client implementations treat
fattr4_case_insensitive and fattr4_case_preserving. Research is
needed.
--
Chuck Lever
next prev parent reply other threads:[~2025-09-10 14:35 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 17:58 LInux NFSv4.1 client and server- case insensitive filesystems supported? Cedric Blancher
2025-06-04 18:52 ` Cedric Blancher
2025-06-07 18:30 ` Chuck Lever
2025-06-07 22:39 ` Theodore Ts'o
2025-06-08 10:19 ` Jeff Layton
2025-06-08 16:29 ` Chuck Lever
2025-06-08 20:52 ` Theodore Ts'o
2025-06-08 21:52 ` Chuck Lever
2025-06-09 15:28 ` Gabriel Krisman Bertazi
2025-06-09 15:50 ` Theodore Ts'o
2025-06-09 16:41 ` Chuck Lever
2025-06-09 5:57 ` Christoph Hellwig
2025-06-09 14:16 ` Chuck Lever
2025-06-10 5:34 ` Christoph Hellwig
2025-09-09 16:06 ` NFSv4.x export options to mark export as case-insensitive, case-preserving? " Cedric Blancher
2025-09-09 16:11 ` Cedric Blancher
2025-09-09 16:11 ` Chuck Lever
2025-09-09 16:33 ` Cedric Blancher
2025-09-09 19:32 ` Chuck Lever
2025-09-10 10:44 ` Roland Mainz
2025-09-10 13:37 ` Rick Macklem
2025-09-11 8:07 ` fattr4_archive "deprecated" ? " Cedric Blancher
2025-09-11 15:01 ` Rick Macklem
2025-09-11 15:26 ` Trond Myklebust
2025-09-11 15:33 ` Cedric Blancher
2025-09-11 15:36 ` Cedric Blancher
2025-09-11 16:08 ` Cedric Blancher
2025-09-10 11:10 ` Jeff Layton
2025-09-10 14:14 ` Chuck Lever
2025-09-10 14:30 ` Jeff Layton
2025-09-10 14:35 ` Chuck Lever [this message]
2025-09-11 6:52 ` Cedric Blancher
2025-09-11 6:49 ` Cedric Blancher
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=118e8e22-39f8-4cb8-87c8-81637ca280e2@oracle.com \
--to=chuck.lever@oracle.com \
--cc=cedric.blancher@gmail.com \
--cc=hch@infradead.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/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