From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F21BDFF885A for ; Sat, 25 Apr 2026 01:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:To:In-Reply-To:References:Message-Id: MIME-Version:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CfuXSLjRZLGT8N7M2g4TfwNchohyU+FbpA5bZ6Ds0Tg=; b=lCZ2Im+EDwk/m8oWtIZnPAS6lh bIqEPR9xyk/2+RO0bt9xkYm9ykmvEInBqRIZ+5cHdLRa4vtrECaVVdmxDuOmk1ddtYqvFgF8kVM0h lSvfGF3l64oz3KavQt198BD5QlGuS7jjpxab1Cc4pYui7RxT/gymQsJZ+z1FLA0fPaG4=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1wGSDU-0007LE-TP; Sat, 25 Apr 2026 01:53:57 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1wGSDS-0007Ka-Uu for linux-f2fs-devel@lists.sourceforge.net; Sat, 25 Apr 2026 01:53:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GXissqW8iybfobuQl29f5mWxEh7d3V2a3e4uJOLCuFg=; b=JO8PYbaUMgcrYKKfO1yBJeFl1A Vlbt93rK2foiVkNyjl4MOxqS9qQFTVBdDH7EZl4ApNu0R7T5Nz7iaWn92Qi63d6iAag45O1Bq1AsG AC54d4Hw+hpiqzV8JCWUzM2iggWlExWdLdo0uWRRUGZTB8KvT6LluvJa/ymA+pAb95XY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Cc:To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GXissqW8iybfobuQl29f5mWxEh7d3V2a3e4uJOLCuFg=; b=nFLQDo8mcExm5Zt1eS6vdO0KGS eq96ZIFPKPtv8wsTjoUFYELR0QBtDbhYsd28fGZ1iI36GXru1zbeDYQfIfGRWcq3WaCGbI1gB8rOY jHhvtegoKGbWr37hRaN/rpwcBuicaWpM1TGr/jx1BtiZCa27Mnpeu3S4NRQnSSGzITB0=; Received: from tor.source.kernel.org ([172.105.4.254]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wGSDS-00031W-Ps for linux-f2fs-devel@lists.sourceforge.net; Sat, 25 Apr 2026 01:53:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 36BFC600AE; Sat, 25 Apr 2026 01:53:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C6F5C2BCB5; Sat, 25 Apr 2026 01:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777082023; bh=McAV5CNKh/R32ZPI5KLOc1CCIaEWTg3RbqF39WjLumM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Gcm3B2fYKLJtxa8hvELCu3SPnsWf6ztbABIOOGN9y6Q6Mku3H8vvUvPhEe26cC0Xw Z002rynAe/XRvkHF6aP2PopMkXjR1Wv8hB2mh6JLJsSR79pPLWRTAOMKe2YvL881/L DmHEgCb/DsCfl+V0jk6cYaIteSqEVJU4kF3Avj/Zni2y25qscJdjf21rAVhB8QhduI /WwnIVSD9wmACx2XTUi9Hh6m9KM0iFVtwJKLVypZRpLTk+3lkzTWImU8w84g3bPc9U YqGL0G2wfLBfhf5pTsvQ6DW6aFBKMHH/I07H+7OagTcG7RXH4xVokcYcNmR8isboPy mbCvXANhw3pNg== Date: Fri, 24 Apr 2026 21:53:10 -0400 MIME-Version: 1.0 Message-Id: <20260424-case-sensitivity-v11-8-de5619beddaf@oracle.com> References: <20260424-case-sensitivity-v11-0-de5619beddaf@oracle.com> In-Reply-To: <20260424-case-sensitivity-v11-0-de5619beddaf@oracle.com> To: Al Viro , Christian Brauner , Jan Kara X-Mailer: b4 0.16-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1864; i=chuck.lever@oracle.com; h=from:subject:message-id; bh=RS1NIQW3n5GlbUoKY0pTlmEy0aDu/j9sxZEq/mBzFA4=; b=owEBbQKS/ZANAwAKATNqszNvZn+XAcsmYgBp7B6Q6D91o7/MLr7c2zWRs0GCu5gLIEhcOjU7/ rK0Gf8Oh5yJAjMEAAEKAB0WIQQosuWwEobfJDzyPv4zarMzb2Z/lwUCaewekAAKCRAzarMzb2Z/ l8bkD/kBBqZqXFav38eelQEr/+UzlNvGTeUgVS9X9STU3qv7LpwYVCdXGB8WzzwRr+7Hej9CSTn n3jk3qIq5wnKC0c40tNfYadmvQFA9JxWuDuFZe1zukJqTWXuGZ6+Z+Am6LGRRiPOxizUW1C3mJe OMYX87ic2p16Ub9McqmRxFhUXXDSfrQtZYiFvm/IBYndrmQNc91C15mMWfM0FvxBosF9lQt+SfK 3rx4OKRyhtqfqVSED49uc8TSe1ceKHlRJuQdOax3jXSX0jIjPiKB02bF+8uFsB2MtTrn76sMrpD jpBv5PdU+/DA2VQyx8u+90lalhH1I99St6XCRyyiCG8VVXO92gaSxMPoN5rO6MxcNre/Hrfb81z 4wVJncFAXaEbuqWIxo6cMy9og3iNDX8AUddTyemP4Bb6dfBTReddetmqXf7AIf9zzsJGRZU45gz GJ84LZLdGAdo9f98rvuXGR8flp4XYcf31g76Z91wIak9nbliy3sPpYJTnmEamYVIT05SK9rXpS0 wKoSUIjSWxURSsKX8gqaWLjx2LhU8fQGEqqO0j4u3y4cUSD5CcfMgtIvJVTTN33tpa95F5Dm3x5 A1z+nafZOiH7XEptWSI4JDpBsozEa2cexJwB/fbN1SYaLj7g3Dj67cuNaWO7HFXSGn/GgwKy6PA jpxvjWyTsmCFx7w== X-Developer-Key: i=chuck.lever@oracle.com; a=openpgp; fpr=28B2E5B01286DF243CF23EFE336AB3336F667F97 X-Headers-End: 1wGSDS-00031W-Ps Subject: [f2fs-dev] [PATCH v11 08/15] xfs: Report case sensitivity in fileattr_get X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Chuck Lever via Linux-f2fs-devel Reply-To: Chuck Lever Cc: pc@manguebit.org, yuezhang.mo@sony.com, cem@kernel.org, Roland Mainz , almaz.alexandrovich@paragon-software.com, adilger.kernel@dilger.ca, linux-cifs@vger.kernel.org, sfrench@samba.org, slava@dubeyko.com, linux-ext4@vger.kernel.org, linkinjeon@kernel.org, sprasad@microsoft.com, frank.li@vivo.com, ronniesahlberg@gmail.com, glaubitz@physik.fu-berlin.de, jaegeuk@kernel.org, hirofumi@mail.parknet.co.jp, linux-nfs@vger.kernel.org, tytso@mit.edu, linux-api@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, senozhatsky@chromium.org, Chuck Lever , hansg@kernel.org, anna@kernel.org, linux-fsdevel@vger.kernel.org, sj1557.seo@samsung.com, trondmy@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net From: Chuck Lever Upper layers such as NFSD need to query whether a filesystem is case-sensitive. Add FS_XFLAG_CASEFOLD to xfs_ip2xflags() when the filesystem is formatted with the ASCIICI feature flag. This serves both FS_IOC_FSGETXATTR (via xfs_fill_fsxattr() in xfs_fileattr_get()) and XFS_IOC_BULKSTAT (which populates bs_xflags directly from xfs_ip2xflags()), so bulkstat consumers and per-inode queries see a consistent view of the filesystem's case-folding behavior. XFS always preserves case. XFS is case-sensitive by default, but supports ASCII case-insensitive lookups when formatted with the ASCIICI feature flag. Reviewed-by: Roland Mainz Signed-off-by: Chuck Lever --- fs/xfs/libxfs/xfs_inode_util.c | 2 ++ fs/xfs/xfs_ioctl.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/fs/xfs/libxfs/xfs_inode_util.c b/fs/xfs/libxfs/xfs_inode_util.c index 551fa51befb6..82be54b6f8d3 100644 --- a/fs/xfs/libxfs/xfs_inode_util.c +++ b/fs/xfs/libxfs/xfs_inode_util.c @@ -130,6 +130,8 @@ xfs_ip2xflags( if (xfs_inode_has_attr_fork(ip)) flags |= FS_XFLAG_HASATTR; + if (xfs_has_asciici(ip->i_mount)) + flags |= FS_XFLAG_CASEFOLD; return flags; } diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index ed9b4846c05f..5a58fb0bad2b 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -472,6 +472,13 @@ xfs_fill_fsxattr( fileattr_fill_xflags(fa, xfs_ip2xflags(ip)); + /* + * FS_XFLAG_CASEFOLD is read-only; hide it from the legacy + * flags view so chattr's RMW cycle does not pass it back to + * xfs_fileattr_set(). + */ + fa->flags &= ~FS_CASEFOLD_FL; + if (ip->i_diflags & XFS_DIFLAG_EXTSIZE) { fa->fsx_extsize = XFS_FSB_TO_B(mp, ip->i_extsize); } else if (ip->i_diflags & XFS_DIFLAG_EXTSZINHERIT) { -- 2.53.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel