From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91D8A3612F8; Mon, 12 Jan 2026 17:46:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768240017; cv=none; b=G6Fv8+E4BymLybmOq2Y0C9NBhzscuCLkEVnXMPn3WoB1pzDUvTiI+NieTF7f1xq1qY6OheAHs/vM64nMXbyMikgRgFQjJyg7JFGduvTJV/iZsOENpAJldEllV9T3h4jL55Exy5b1rGlnrpA1o5dCffHpUYnlP++lhtq7v5ToZdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768240017; c=relaxed/simple; bh=Hnozn2sdgRnA1HMevRa1Ee51oWOT/FX5helgZbvUUkM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Gsdu/0kclqFKu4xNkN+exMTfIw41/cNw4+xcXrN7JRFqm8UWk1V3BulOsnFw6gxHJbsgVMt2ld0SAoxWRWTLo73ZHODjhnO7wP27fUSRJuAPAn8BgYFya4ZL9uj1FtF2AH57FgP6wvkGby4UXUuDBdEKEHh2RJtxkJAWzGQD/OM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cooTinHb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cooTinHb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02A8DC2BC86; Mon, 12 Jan 2026 17:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768240017; bh=Hnozn2sdgRnA1HMevRa1Ee51oWOT/FX5helgZbvUUkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cooTinHbxWXarz9+KKRqJTJHeempyiqEr7dgTG7ICeqILB1L8ta73AgD8r1FJX3My 0uU3yq1Sjl7lMJLniF569jzDeGTCMry+zDzMKrjoAZArtAwzuhMdsTjZ7i4Sma/B5M r9lv13Et4CTRKMQeeIPQ7V8N2lWIjaxCEvRM+sB5eRCCnw5Fduh7V1R2hc4MDCP1Kn d8Y/8j0P1atfbaRMRuROKx/Jai/5NLBdgxt+IuRqP9YZ7wL4aYRJbc6JSx0jywXGFc wbgpvWtFPuZ5STOHPOFbmGkubVXS7dNbDw27N3ZBAZaeYtjEVo92DPwAylHp2JwxZj IadzAWUrRfZ2Q== From: Chuck Lever To: vira, Christian Brauner , Jan Kara Cc: , linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-cifs@vger.kernel.org, , linux-f2fs-devel@lists.sourceforge.net, hirofumi@mail.parknet.co.jp, linkinjeon@kernel.org, sj1557.seo@samsung.com, yuezhang.mo@sony.com, almaz.alexandrovich@paragon-software.com, slava@dubeyko.com, glaubitz@physik.fu-berlin.de, frank.li@vivo.com, tytso@mit.edu, adilger.kernel@dilger.ca, cem@kernel.org, sfrench@samba.org, pc@manguebit.org, ronniesahlberg@gmail.com, sprasad@microsoft.com, trondmy@kernel.org, anna@kernel.org, jaegeuk@kernel.org, chao@kernel.org, hansg@kernel.org, senozhatsky@chromium.org, Chuck Lever Subject: [PATCH v3 08/16] xfs: Report case sensitivity in fileattr_get Date: Mon, 12 Jan 2026 12:46:21 -0500 Message-ID: <20260112174629.3729358-9-cel@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112174629.3729358-1-cel@kernel.org> References: <20260112174629.3729358-1-cel@kernel.org> Precedence: bulk X-Mailing-List: linux-cifs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever Upper layers such as NFSD need to query whether a filesystem is case-sensitive. Populate the case_insensitive and case_preserving fields in xfs_fileattr_get(). XFS always preserves case. XFS is case-sensitive by default, but supports ASCII case-insensitive lookups when formatted with the ASCIICI feature flag. Signed-off-by: Chuck Lever --- fs/xfs/xfs_ioctl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 59eaad774371..97314fcb7732 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -516,6 +516,13 @@ xfs_fileattr_get( xfs_fill_fsxattr(ip, XFS_DATA_FORK, fa); xfs_iunlock(ip, XFS_ILOCK_SHARED); + /* + * XFS is case-sensitive by default, but can be formatted with + * ASCII case-insensitive mode enabled. + */ + fa->case_insensitive = xfs_has_asciici(ip->i_mount); + fa->case_preserving = true; + return 0; } -- 2.52.0 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 3E220CF45C1 for ; Mon, 12 Jan 2026 17:47:08 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:To:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nY6nG8HsV8/NPIQpSrg7EhLHR5YoYzrZXKghfLBDe98=; b=CkEfaXVZZDpgv0LAXbosfk0iww NTnM+23Qd2smECOherVkfxY/Ep4TFHpkR3HWLgFp+jW5WUvqEWGs0Eo0B9kRTUKDuIdo7WPvnJQ3B r+dArICYVjzHvz0VtJZHpMI4P1Ef/rhzTdw8fKrjmy5qZxaa4v07tBl0UUwaeFo/360o=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vfM0P-00014Y-8G; Mon, 12 Jan 2026 17:47:05 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vfM0N-00014N-NF for linux-f2fs-devel@lists.sourceforge.net; Mon, 12 Jan 2026 17:47:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: 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=8vODR0mTkwnkVx4AhrPb5D1RN5D4JmwgMXWGXrdd9AM=; b=QYzeOtXB2LrhPHaZhWbdMxfUA6 +4nPLl5O8t0ippbd8GHzkdbuP3Qlq+NitEh7PuhatjimVLjmTRIgSgw4KzlDCwwusIstAhuVj7Waf VqRB3zas8pK/kIvSs3WlHX198DGtHpp2r2/HDaCh18mv+WIsE/DtVlr3G6roOQX8bG0k=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=8vODR0mTkwnkVx4AhrPb5D1RN5D4JmwgMXWGXrdd9AM=; b=ltdsviGjfPHqoVr7ZAVDYOiDnq 5Unpvvzb5NErO7UYl+whnGgtbOsyTRh7wdPIARO+YkJSIlYoZf+cxlL/EscqgMIPiMvfwh1D7r2xk 3OyLYWRAwE/2Fave92Sv/tFbAwVL9DS/Gj5TpaKRE67YmDfvt0GSDb25x+HXEqr4Dr/w=; 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 1vfM0N-0008TJ-3P for linux-f2fs-devel@lists.sourceforge.net; Mon, 12 Jan 2026 17:47:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 8785D6001D; Mon, 12 Jan 2026 17:46:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 02A8DC2BC86; Mon, 12 Jan 2026 17:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768240017; bh=Hnozn2sdgRnA1HMevRa1Ee51oWOT/FX5helgZbvUUkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cooTinHbxWXarz9+KKRqJTJHeempyiqEr7dgTG7ICeqILB1L8ta73AgD8r1FJX3My 0uU3yq1Sjl7lMJLniF569jzDeGTCMry+zDzMKrjoAZArtAwzuhMdsTjZ7i4Sma/B5M r9lv13Et4CTRKMQeeIPQ7V8N2lWIjaxCEvRM+sB5eRCCnw5Fduh7V1R2hc4MDCP1Kn d8Y/8j0P1atfbaRMRuROKx/Jai/5NLBdgxt+IuRqP9YZ7wL4aYRJbc6JSx0jywXGFc wbgpvWtFPuZ5STOHPOFbmGkubVXS7dNbDw27N3ZBAZaeYtjEVo92DPwAylHp2JwxZj IadzAWUrRfZ2Q== To: vira, Christian Brauner , Jan Kara Date: Mon, 12 Jan 2026 12:46:21 -0500 Message-ID: <20260112174629.3729358-9-cel@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260112174629.3729358-1-cel@kernel.org> References: <20260112174629.3729358-1-cel@kernel.org> MIME-Version: 1.0 X-Headers-End: 1vfM0N-0008TJ-3P Subject: [f2fs-dev] [PATCH v3 08/16] 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, 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-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. Populate the case_insensitive and case_preserving fields in xfs_fileattr_get(). XFS always preserves case. XFS is case-sensitive by default, but supports ASCII case-insensitive lookups when formatted with the ASCIICI feature flag. Signed-off-by: Chuck Lever --- fs/xfs/xfs_ioctl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index 59eaad774371..97314fcb7732 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -516,6 +516,13 @@ xfs_fileattr_get( xfs_fill_fsxattr(ip, XFS_DATA_FORK, fa); xfs_iunlock(ip, XFS_ILOCK_SHARED); + /* + * XFS is case-sensitive by default, but can be formatted with + * ASCII case-insensitive mode enabled. + */ + fa->case_insensitive = xfs_has_asciici(ip->i_mount); + fa->case_preserving = true; + return 0; } -- 2.52.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel