All of 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 0/2] tmpfs: fix casefold flag inheritance and document mount constraints
Date: Mon, 23 Nov 2026 13:16:27 +0800	[thread overview]
Message-ID: <20261123051629.2547645-1-cui.tao@linux.dev> (raw)

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.


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

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  5:16 Tao Cui [this message]
2026-11-23  5:16 ` [PATCH 1/2] shmem: do not inherit FS_CASEFOLD_FL onto non-directories Tao Cui
2026-12-01  6:09   ` Baolin Wang
2026-12-01 14:37   ` André Almeida
2026-11-23  5:16 ` [PATCH 2/2] Documentation: tmpfs: document casefold option constraints Tao Cui
2026-12-01  6:22   ` Baolin Wang
2026-12-01 14:35   ` André Almeida
2026-11-23 15:40 ` [PATCH 0/2] tmpfs: fix casefold flag inheritance and document mount constraints Gabriel Krisman Bertazi
2026-12-01  9:25 ` Christian Brauner

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-1-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 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.