From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.1 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796215131; b=UcaHIbtp4aQLuIDBQimB7Tud80kcBJC9w3eHjLNfkIjxs7chqzZoMZfSkg0kHj3zXpW/ ZEXY1qGbRIybATO8lhh9CxK/R5bCpOXGgmw0YM2W4tU58OzXIuPkG4OwnTLtMvCkQPmkp CLyGc2PYMfH/Wvnjk28+zWaa8gnnF0z0etYKQN2F7t6YK58nypbzTwDF4hq6Ev8TYCEWI 8/E3lJexTWckXIoxvi2D9IzCsuNS+Aq8YPnaKZ92Vf63qG6vPMnL3BnW4/fOFZck+smaZ r183U01qLe5ZU6nYPldppH3Mw8NHEPrlZ9sBZJtDyiw9/CixLPDzBmm8zMbi3nOjzGg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796215131; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=VAS9ZG9YHcUPgNEDJywxblnbdwuvMm2dqFUYayH99hQ=; b=Ke/wnqd+tfeaT201GP5YyCMdKQBZ80lxetvizGMJqKRBVNG7JTjFHN9+JQmiNhQQZ3xC 7Xq87xb1vlj4fi6gmUAigAr4hukjrjD3/qMS5BAUhRqx32HaN7YqgP3w2OjwUQxFeSpC6 1R4rvYU6agz12akLAytzCbqmxODUWB7IpB9YXpWd6xwuhMP8ewvqC77u9fAEPILuM78jM Myuo0GeMzeRhmiNDpPNB0iab+62KaEF66tR7TAw1wG+1aMB9Y4q0Fb96NEzMwdpi8KVUu wAFBy6pAG7dLogXOS9gimmy8/46QQIC1KgwSLzzOm/RzI6VH8YRscdgSALZaXg4cw1g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b="NvHN3/mD"; arc=none smtp.remote-ip=95.215.58.1 Received: from mta1.migadu.com (out-1.mta1.migadu.com [95.215.58.1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC542606A688 for ; Wed, 2 Dec 2026 12:38:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CC542606A688 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=NvHN3/mD X-Envelope-To: linux-fsdevel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=UsOo+MSNupAV3P3f1HTSIvtnWY0qmrdFCarYZ3U3OJM=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796215122; v=1; x=1796819922; b=NvHN3/mD55UECOSsf3AUcJLmpI7lf9/pLI0Bvrq3fKWV4K8MrfXax4XurnNnkV5dgTUQpi9I MUiVEEfsm1e2HpnNjNOIH2jxZyKYqqTxPDbH+EFEFaHWePA+wdsdfsoaCT+PGTswwpaj/iCLIYv G1nBAOi8j+F6Q1R05Lrwe5HI= X-Envelope-To: linux-fsdevel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id e8bfbc4efb33a328; Wed, 02 Dec 2026 12:38:42 +0000 X-Mizu-Trace-ID: e8bfbc4efb33a328 X-Migadu-Flow: FLOW_OUT From: Tao Cui To: brauner@kernel.org Cc: hughd@google.com, david@kernel.org, akpm@linux-foundation.org, 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 Subject: [PATCH v2 0/2] tmpfs: fix casefold flag inheritance and document mount constraints Date: Wed, 2 Dec 2026 20:38:32 +0800 Message-ID: <20261202123834.2439906-1-cui.tao@linux.dev> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Tao Cui 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