From: Tao Cui 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. Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Baolin Wang Reviewed-by: André Almeida Signed-off-by: Tao Cui --- 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.43.0