From nobody Sat Jan 17 00:05:04 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 4dtH6X0xHgz6P4rQ for ; Sat, 17 Jan 2026 00:05:24 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 4dtH6W5wlhz43bd for ; Sat, 17 Jan 2026 00:05:23 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-65378ba2ff7so4484654a12.2 for ; Fri, 16 Jan 2026 16:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768608316; cv=none; d=google.com; s=arc-20240605; b=ARIzbSnb29IUeYEXMpR04zygRKM8EbEmjO9nWrBCUBz5B1qS8x4Y31fs0Eyfa7DHu3 pbJ/UHsAJa8vxdZhFD01idNtqzESfYiJ+7cFCHOfRWweTj0Ze3DRCxLOrwj44KxrLTjz Tp5z/k1z5rzRui9WIEs4qk3oOdPLrSMXgEcyEdNAgf9EbDWpfm+bfl/E/QnSvhZQmegj fNB3inH+10ja00IGUMPV05aYsyT6DzOlepyztCE76LsveW2uXy3Jvp3YajgNi2V++Pai ReW42dND1fVhsGc2+bFaTRuSEfG76F8ZKUUqLqn6vUmZ20Fqgqfow7NRec0cyyT3F0h+ OAtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=lZKz7BzNct/fByeg672pFvPYgzgGK1dXnhPQychFXtk=; fh=WpPPbVSDqo6fCNIrrUDRK0HLU+fqfRqote0XcKRXHRo=; b=G3mXtpKurlaAnrvfbVECzDHDZkNQRVJnr5BywRHDOzBIv0CWNBYRkHu+pFrhW0QyqQ 0JNP2QF0zu0knh61ixB2xFdq5RVpJ6E1NyWSAgZvz9E4X+1nUvY/YAZzu7b1phGcjMR0 ex3fDIos8bgJel1sOxte2HE62EW2vnywHAmlwOG2LuYvSp1QZH8Z7VWdbQlZat0tSaST xyLfs48VNarfEUSz7NjAWexbbrsNuCUeXiT+NLI3NwXgElAIpO2MJgMnNIbmZi4dphQv 1c4eASQ93g510gStAfrIlsFhEmPKSxujdrL0tmnmWmUjY7AU7xYZbakU1tQMEQbBrEn7 nrzQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768608316; x=1769213116; 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=lZKz7BzNct/fByeg672pFvPYgzgGK1dXnhPQychFXtk=; b=gudoI9xtpWmpboZXNEqN49t6P6ZfnFAfN8M0ds/0uLoq+FqRBjs/C/SLrBQhExT4bD ccwcOBT2dZNUidntlhIFdx7JnyALdoPPkKUJI+KQug7R74diIsV2L48+6iK3r6coiHTR eOjQKtl6EFZdVH7OUe+AmHxuyOzvZCVJZVhMyAfoNqkTJ03uwPTsl6J38FM16QrTmBLX Ybj4lNvdccXVbCWP+kvke6AKXNgu/8O/1ZnK02bvJqSrpDzaJy95gDscIcp8FHAQndBs hiTndpjA+QM4BZz5n6Lq35imXJ8b2rFmro5igEHd1wJ6Xc1X83blXjwjkYgAp1YGsfTD fTzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768608316; x=1769213116; 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=lZKz7BzNct/fByeg672pFvPYgzgGK1dXnhPQychFXtk=; b=lw0Xz4nWnSni+Fa79n3EATle1Z4TNC78P14gq9RtqEIQHwNjfLMhJbKWb1DBNq1DU7 9q4R9Dudio93NPcUIqzWqtwq+DpSNzDKfeq0+r2FcdzJ9AcAXvWU8A0bfZizZpV0ZzT8 aiIRHbXCH7BHKXSisp23hs2h1yUwrODxBvJNpqbuEwEakkJJqEdfeB7zbHZoU5WxCmUx 3PMZIAfb/arj/e/HyMBLK9OD7/A+cKrsNmjfRs9QU5nGPnagzL2AX8chzTmN3rBdByBC FDyEVdl6PiLbHhUiybAuuFXh42kplYc0JWlNlVaN/M5OzkZVyn/Y1iPQAcaJB4Jx+Lm3 EQIA== X-Forwarded-Encrypted: i=1; AJvYcCWV9DwwFrSpYA5Ds7zYauupXMNPhcgLaxPiiEVf4kCRfsfiOh6d52lyQqpVCwPXa9ev+o/WdsM+wSwSDIOIgNw=@freebsd.org X-Gm-Message-State: AOJu0YzRi8qVorwAjiCViHckBV2iJkwzhsd3GHeVzht8i60wIhjSe1eQ Y2/raGKZx5hDs2QmnvxP5uvdpBuXBWV36/vFtvwi+7TDed0YdpnN9Cjri+uFzZVjrqtP6g65FV4 lCjVnCmwmkQzNb1TFrq6fs4WSX7MHFzoNB+4= X-Gm-Gg: AY/fxX6pkXG0jgJ4lcX1zTfJd9dRrQ509LnLCBsa+3WSf9mVVY7y3DjCVgWo3cDYtzK jx17Q5dGq3MDzE6nVnPJg9hPYaiaiEXwKtTmkztKTMf/FHpFI2Sz3JS2qFcqJ7te4CcTSpKd9Q9 cu7vbTGKz8Vj3092ABU0cigg2V/I4MqY5BpVA2/RfJ6CwRXSj3An6dUh141XSdPREvMGBy7IVJ8 QcyIsI/7knP878KnRlC5MHn0ZF/DWfwhyXEr0rVFfKlnisRWBL7hORCbIQDiQDupElUchQCAkpR AZNAAX6pQ6WsAoSFCYfUt3M+NcUg X-Received: by 2002:a05:6402:5111:b0:64b:8d7a:71cf with SMTP id 4fb4d7f45d1cf-654bb42981amr3143858a12.26.1768608316487; Fri, 16 Jan 2026 16:05:16 -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: Fri, 16 Jan 2026 16:05:04 -0800 X-Gm-Features: AZwV_QhQaA_UZxryu3FFoEff3FtjBgFrLRrOj6bVeytqtY5vcqd2LkwE57UaMI0 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 [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dtH6W5wlhz43bd 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 Blancher > > > > > > > wrote: > > > > > > > > > > > > > > > > Good evening! > > > > > > > > > > > > > > > > Does the FreeBSD >=3D 14.3 NFSv4.1 client and server suppor= t 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 support > > > > > case-insensitive filesystems? > > > > I suppose. It doesn't care. If an application cares (I don't know o= f > > > > 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. about cac= hing > > > 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 forgot > > about it. So, I suppose that the current answer is "the NFS client > > does not handle case-insensitive file names correctly" until handling > > 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-ASCII > > 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 format. > > Due to this, msdosfs does not cache -ve entries at all. This, together > with cache purge for the directory on rename or remove, should be enough. > Of course, this assumes that lookup would match a dirent entry right > WRT the case. > > I do not know exactly how the non-ASCII codepoints are handled by our > msdosfs, but I am sure that we do not have unicode tables for convertion > between cases. In other words, we most likely do not handle them well. > > 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 msdosfs > 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 insensitive 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-ASCII case, I think?) --> Does this sound like a reasonable plan? rick >