Skip to content

tmpfs: fix casefold flag inheritance and document mount constraints

Tao Cui linux-fsdevel linux-mm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2shmem: do not inherit FS_CASEFOLD_FL onto non-directoriesmm/shmem.c+7 -00 replies
2/2Documentation: tmpfs: document casefold option constraintsDocumentation/filesystems/tmpfs.rst+9 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGabriel Krisman Bertazi
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] tmpfs: fix casefold flag inheritance and document mount constraints

From: Tao Cui <[email protected]>

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.