All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] tmpfs: fix casefold flag inheritance and document mount constraints
@ 2026-12-02 12:38 Tao Cui
  2026-12-02 12:38 ` [PATCH v2 1/2] shmem: do not inherit FS_CASEFOLD_FL onto non-directories Tao Cui
  2026-12-02 12:38 ` [PATCH v2 2/2] Documentation: tmpfs: document casefold option constraints Tao Cui
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Cui @ 2026-12-02 12:38 UTC (permalink / raw)
  To: brauner
  Cc: hughd, david, akpm, linux-mm, baolin.wang, andrealmeid, krisman,
	linux-fsdevel, cui.tao, Tao Cui

From: Tao Cui <cuitao@kylinos.cn>

Files created in a casefold tmpfs directory inherit the
directory-only FS_CASEFOLD_FL flag, which shmem_set_inode_flags()
then rejects with -ENOTDIR on non-directories: the inode records a
phantom F flag, so the value FS_IOC_GETFLAGS reports can never be
written back and attribute changes via chattr fail, dropping
NOATIME/NODUMP from the same request.  The casefold mount option
constraints that commit 5cd9aecbc72c ("tmpfs: Add flag
FS_CASEFOLD_FL support for tmpfs dirs") landed with are also
undocumented.

  - P1: mask FS_CASEFOLD_FL for non-directory inodes the way
    ext4_mask_flags()/f2fs_mask_flags() do.
  - P2: document the CONFIG_UNICODE prerequisite, the
    strict_encoding pairing and that both options are ignored on
    remount.

Testing: on a VM with CONFIG_UNICODE=y, before the patch a file
created in a +F directory advertises the F flag via
FS_IOC_GETFLAGS and chattr +i on it fails with ENOTDIR; after,
the flag is not recorded and chattr works as usual.

Changes in v2:
- Shorten the casefold inheritance comment per review
  (Baolin Wang, André Almeida).
- Collect review tags from v1 (Gabriel Krisman Bertazi,
  Baolin Wang, André Almeida).

Link to v1: https://lore.kernel.org/r/20261123051629.2547645-1-cui.tao@linux.dev

Tao Cui (2):
  shmem: do not inherit FS_CASEFOLD_FL onto non-directories
  Documentation: tmpfs: document casefold option constraints

 Documentation/filesystems/tmpfs.rst | 9 +++++++++
 mm/shmem.c                          | 3 +++
 2 files changed, 12 insertions(+)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-02 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 12:38 [PATCH v2 0/2] tmpfs: fix casefold flag inheritance and document mount constraints Tao Cui
2026-12-02 12:38 ` [PATCH v2 1/2] shmem: do not inherit FS_CASEFOLD_FL onto non-directories Tao Cui
2026-12-02 12:38 ` [PATCH v2 2/2] Documentation: tmpfs: document casefold option constraints Tao Cui

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.