From nobody Sat Jan 17 22:58:27 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dtsbG4P8Tz6PNQN for ; Sat, 17 Jan 2026 22:58:50 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dtsbF3HRvz3Sh6 for ; Sat, 17 Jan 2026 22:58:49 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=ifl1MYwI; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rick.macklem@gmail.com designates 2a00:1450:4864:20::531 as permitted sender) smtp.mailfrom=rick.macklem@gmail.com Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-652fec696c9so5587649a12.3 for ; Sat, 17 Jan 2026 14:58:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768690721; x=1769295521; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Fw/muJc1A355HPjK5W7B+uao7p3n2d1NmZq/TT1yQAE=; b=ifl1MYwIjxtV6ueT6riq95v6JB8ijG7vlSSkNVJh1ZcF/F4fPBsDQc0WNCNB9SSNYX 418l340LjjkeEnv2XyB4yfGTUrtSjzan6VGzUBm5KChGwwBbr2+iRlp8PDX40ifv3S7X HstrloPJDU6dww7dmKwMAQ4sc72Inl1swXkO3Zg5qBy1A58aLAvV6Ti1W0PIyxSqDLZh X3mWLtmwcVbw8GVqz2oNxcK/NP5lpAYRXNS1A+zH8VV1FfM0KQUJ6B0V3iNI+gk0IHpC rl8wO8ez5JPhhU+4IUExqVvdhpsRPAp4vIZlEDPT/zRcGNh3GK3YPjB4hzf1l9TeBiNj TiNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768690721; x=1769295521; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Fw/muJc1A355HPjK5W7B+uao7p3n2d1NmZq/TT1yQAE=; b=YvVdKKBEfM4xn7Q5Ayji9Tagwn3Wj7FxAL/aP+4mrbYQNRUy/4DKBzy81iyEW1Yv6L p6QKV8yKZWgrtR3NIDoIV+bMlSzbNHOW3R1/kIEkUoIQLr1Okginl3n1otj3GDpm9r6O Qp0lnOYbopuGsGJKadSzmWQYErn+gi9K57A6PNX17BhUuhv6k+bPflGTvR0ss6fMOSRG s818xQ/he0v153SGhSnAPAmOxLwwtE6TSQ+yX72zB7pEkru5Z2YUS9pEKiPkU1qFTaVK V4MesE0/k7sFvY37u3Uyy621XaVoST4NaebcJByy7qFdOJRDNTEuKXYpPtbR3SCA41NZ JRsg== X-Forwarded-Encrypted: i=1; AJvYcCVoPxSPXccQxzdSfqsQn9xmDpiAPIBR0ShHdVplFLlW7aAFEq6RsJfIkGT17vdP/neSwte7mx3iS6awNJ999S4=@freebsd.org X-Gm-Message-State: AOJu0Yx93VmmamkTEDUEcFcmrrpj12aJjEdeVbsLlytURUK9EwKnx1s/ RHZ0mNApJqoZUUHqSot9CtaxgzcSSzxUy4yks1dzYlh7fSwTWUMuqPEtnXCB0GcYHrG9eHBER+T Ry8g7Fm++AA5Io7ofJoPhr2kBzV4OAg== X-Gm-Gg: AY/fxX6mXiYrz8/3md5C72dKX/1IKlabjLei9IrrKyH+3j/ITqZC5jRaoyUldG9NNHe 8O7bEdTRyODaHfsD9GTTf+uYGaT/MVM/5fqGIbYKDnQHgxK0duLazmXRHFcR0VDZnLUJkVn00y9 f1EetPZaZol2OExiVg33SQFchfzEz0chQ0Bc22uSldci+EaSht4jqiNF6wTzM6K/Z8KsD+m3rvw mWTKbHBs2wtOniboNYB1f206/tVUwfKeWnHxnsvSiej6DMY7MEuIW5I+Q3N8zrNo0IzBlQlBwZs R1rFCsbBFqLIAeng2iyVUmY8nWp+X8eqTJyYtIM= X-Received: by 2002:a50:8dc5:0:b0:64d:bab:3490 with SMTP id 4fb4d7f45d1cf-654525cc111mr4164822a12.12.1768690721387; Sat, 17 Jan 2026 14:58:41 -0800 (PST) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Rick Macklem Date: Sat, 17 Jan 2026 14:58:27 -0800 X-Gm-Features: AZwV_Qh6PmPwA-7cewW9WrZl8NOrkjGKpsmkWAiKBxpBQKI5OtOB-nC99i0FI1Y Message-ID: Subject: Re: FreeBSD NFSv4.1 *CLIENT* - case insensitive filesystems supported? Re: FreeBSD NFSv4.1 client and server - case insensitive filesystems supported? To: Konstantin Belousov Cc: Cedric Blancher , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.65 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.65)[-0.652]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; MIME_GOOD(-0.10)[text/plain]; TAGGED_FROM(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_RCPT(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::531:from] X-Rspamd-Queue-Id: 4dtsbF3HRvz3Sh6 On Fri, Jan 16, 2026 at 4:21=E2=80=AFPM Rick Macklem wrote: > > On Fri, Jan 16, 2026 at 4:12=E2=80=AFPM Konstantin Belousov wrote: > > > > On Fri, Jan 16, 2026 at 04:05:04PM -0800, Rick Macklem wrote: > > > On Fri, Jan 16, 2026 at 3:47=E2=80=AFPM Konstantin Belousov wrote: > > > > > > > > On Fri, Jan 16, 2026 at 03:24:38PM -0800, Rick Macklem wrote: > > > > > On Fri, Jan 16, 2026 at 6:18=E2=80=AFAM Konstantin Belousov wrote: > > > > > > > > > > > > On Fri, Jan 16, 2026 at 05:53:56AM -0800, Rick Macklem wrote: > > > > > > > On Thu, Jan 15, 2026 at 11:55=E2=80=AFPM Cedric Blancher > > > > > > > wrote: > > > > > > > > > > > > > > > > On Mon, 12 Jan 2026 at 23:04, Rick Macklem wrote: > > > > > > > > > > > > > > > > > > On Mon, Jan 12, 2026 at 1:56=E2=80=AFPM Rick Macklem wrote: > > > > > > > > > > > > > > > > > > > > On Mon, Jan 12, 2026 at 11:52=E2=80=AFAM Cedric Blanche= r > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Good evening! > > > > > > > > > > > > > > > > > > > > > > Does the FreeBSD >=3D 14.3 NFSv4.1 client and server = support case > > > > > > > > > > > insensitive filesystems, e.g. exported ZFS or FAT? > > > > > > > > > > Greater than, as in 15.0. > > > > > > > > > Oops, that's 15.1-> > > > > > > > > > (I looked and it is in stable/15, but not releng/15.0.) > > > > > > > > > (I work with main and the stable branches and don't keep = track of when the > > > > > > > > > releases branch off.) > > > > > > > > > > > > > > > > What about the FreeBSD 15.x NFSv4.2 client - does it suppor= t > > > > > > > > case-insensitive filesystems? > > > > > > > I suppose. It doesn't care. If an application cares (I don't = know of > > > > > > > one, offhand), it can check via pathconf(2) to see if the fs = is > > > > > > > case-insensitive (the _PC_CASE_INSENSITIVE pathconf name > > > > > > > was added recently and will be in 15.1). > > > > > > > > > > > > If the client uses namecache, then I suppose it cares, esp. abo= ut caching > > > > > > the negative lookups. Also for renames and deletes, the whole = set of > > > > > > cached entries for the directory must be expunged. > > > > > Good point. I did have looking at this on my "to do" list, but fo= rgot > > > > > about it. So, I suppose that the current answer is "the NFS clien= t > > > > > does not handle case-insensitive file names correctly" until hand= ling > > > > > of negative name caching is fixed. > > > > > > > > > > Initially, I might just disable name caching for case-insensitive= file > > > > > systems. > > > > > > > > > > It sounds like the name caching code should have an option for > > > > > case-insensitive name comparison? > > > > > (For plain ASCII, that should be straightforward, but for non-ASC= II > > > > > character sets?? I am not conversant with how case insensitivity = is > > > > > handled for non-ASCII character sets. I know that ZFS has some > > > > > "form" options, but that's all I know?) > > > > > > > > Msdosfs is case-insensitive by MS requirements. It also has some > > > > complications due to long names translations to the 8.3 FAT16 forma= t. > > > > > > > > Due to this, msdosfs does not cache -ve entries at all. This, toge= ther > > > > with cache purge for the directory on rename or remove, should be e= nough. > > > > Of course, this assumes that lookup would match a dirent entry righ= t > > > > WRT the case. Thinking about it a little more, I think I will try the msdosfs way. I am working on setting up some testing to first try and break the broken client. Thanks for your comments, rick > > > > > > > > I do not know exactly how the non-ASCII codepoints are handled by o= ur > > > > msdosfs, but I am sure that we do not have unicode tables for conve= rtion > > > > between cases. In other words, we most likely do not handle them w= ell. > > > > > > > > Does nfs client know if the server is case-insensitive? > > > Yes, for main (and 15.1 when it gets released). > > > So, I have a little while to fix it. > > > msdosfs and ZFS are patched to return 1 for pathconf() > > > for _PC_CASE_INSENSITIVE and the NFS client now > > > gets this info. (It only gets a boolean indicating if the > > > server file system is case-insensitive. It does not get any > > > other info like what ZFS has, below.) > > > > > > ZFS appears to completely disable name caching when the > > > file system has normalization set to other than none (if I read > > > the code correctly?). > > > >From "man zfsprops".. > > > normalization=3Dnone|formC|formD|formKC|formKD > > > (I have no idea what these mean, but I am guessing that there > > > is code in ZFS for these. Of course, it will CDDL'd, so it cannot > > > be included in the base system.) > > > > > > > Then it could > > > > act similarly to our msdosfs. But again, I do not think that msdos= fs > > > > informs nfs server that it is case-insensitive. > > > Yes, I think this would be sufficient for now. > > > (I was thinking of putting a nfs_XXX() front end for the cache_XXX() > > > calls. It could map names to "all lower case" for the case insensitiv= e > > > case, but that only works for plain ASCII. > > > If there was a mount option that completely disables name caching > > > instead of mapping to "all lower case", that would cover the non-ASCI= I > > > case, I think?) > > Disabling caching at all would work, but would probably also be quite > > inefficient. > Yes. I'll admit I have never heard anyone report problems with this. > I suspect that means that NFS servers that are configured with > case-insensitive file systems are not commonly mounted by the > FreeBSD client (this name caching bug has always been there). > > Cedric might know how the NFS server in Windows Server handles > this? > --> Does it just do case-insensitive file name comparisons or is it > somehow configurable or ??? > > I don't think inefficient will be a problem for msdosfs and I doubt > many configure ZFS file systems as case-insensitive on FreeBSD? > (I can see the use case of a Windows NFSv4.1/4.2 client mounting > FreeBSD ZFS exports, but I suspect those file systems will not often > be mounted by FreeBSD clients?) > > rick > > > > > I implemented nonc option for tmpfs, you might grep for rm_nonc in fs/t= mpfs > > to see how the plumbing works. > > > > > > > --> Does this sound like a reasonable plan? rick > > > > > > > > >