Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Cui <cui.tao@linux.dev>
To: hughd@google.com, david@kernel.org, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, baolin.wang@linux.alibaba.com,
	andrealmeid@igalia.com, krisman@suse.de,
	linux-fsdevel@vger.kernel.org, cui.tao@linux.dev,
	Tao Cui <cuitao@kylinos.cn>
Subject: [PATCH 2/2] Documentation: tmpfs: document casefold option constraints
Date: Mon, 23 Nov 2026 13:16:29 +0800	[thread overview]
Message-ID: <20261123051629.2547645-3-cui.tao@linux.dev> (raw)
In-Reply-To: <20261123051629.2547645-1-cui.tao@linux.dev>

From: Tao Cui <cuitao@kylinos.cn>

The casefold and strict_encoding options require CONFIG_UNICODE (both
are refused without it), strict_encoding must be given together with
casefold, and availability can be probed via
/sys/fs/tmpfs/features/casefold.  None of this was documented.

Also disclose that both options only take effect at initial mount and
are ignored on remount: shmem_reconfigure() never looks at the parsed
encoding, so e.g. "remount,casefold=utf8-12.1.0" succeeds without
changing anything, the same way as the mode, uid and gid options.

Signed-off-by: Tao Cui <cuitao@kylinos.cn>
---
 Documentation/filesystems/tmpfs.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/filesystems/tmpfs.rst b/Documentation/filesystems/tmpfs.rst
index d677e0428c3f..032fa55b0411 100644
--- a/Documentation/filesystems/tmpfs.rst
+++ b/Documentation/filesystems/tmpfs.rst
@@ -253,6 +253,15 @@ strict_encoding   Enable strict encoding at this mount point (disabled by
                   and directory with names containing invalid UTF-8 characters.
 ================= ==============================================================
 
+These options require kernel support for casefolding (CONFIG_UNICODE)
+and are refused without it.  strict_encoding must be given together
+with casefold on the same mount; a mount with strict_encoding but no
+encoding fails.  Whether the running kernel supports casefold at all
+can be probed by reading /sys/fs/tmpfs/features/casefold.
+
+casefold and strict_encoding only take effect when given at initial
+mount; on remount they are ignored.
+
 This option doesn't render the entire filesystem case-insensitive. One needs to
 still set the casefold flag per directory, by flipping the +F attribute in an
 empty directory. Nevertheless, new directories will inherit the attribute. The
-- 
2.53.0



      parent reply	other threads:[~2026-11-23  5:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  5:16 [PATCH 0/2] tmpfs: fix casefold flag inheritance and document mount constraints Tao Cui
2026-11-23  5:16 ` [PATCH 1/2] shmem: do not inherit FS_CASEFOLD_FL onto non-directories Tao Cui
2026-11-23  5:16 ` Tao Cui [this message]

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=20261123051629.2547645-3-cui.tao@linux.dev \
    --to=cui.tao@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=andrealmeid@igalia.com \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=cuitao@kylinos.cn \
    --cc=david@kernel.org \
    --cc=hughd@google.com \
    --cc=krisman@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.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