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 081D043C042; Tue, 20 Jan 2026 14:25:10 +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=1768919110; cv=none; b=VZjzwdytsLg3CawJeAJY/0JMdthPYEqmkZD8AH0EPIvu0VQwGIaC02Ki4mwBvF1h0KBKL97AkcpKFTYHbvfVaiqfFA7TZU+LcrpEzgbBHo2Y/3CQMwApJU+c/UpZpwkDpAGZ6hm2NDNOE4j2IUXQ/EkFVTFM59CP2X7lsCrmp40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768919110; c=relaxed/simple; bh=YDDyyYB+YVCQQ3bOYUSgoPwx7V5Jm2aE0B8Vt/Q0AHw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cRTE5narB1xXefTYlWepd34EJsCDSVE2a2mhbIrISY0RA09Wi/32nc7RkFMa6/YKM/uxXWQPXVa9ubAvlv/9FJNVPI8tkn3dxmxNXDDcKL/crX9bWMpYvREOPVKEocdQQf+E3jldvmd3paKF+l0t+RxgLF6UIdGiMjykNk9kO3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SY6i7aN+; 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="SY6i7aN+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACFADC19423; Tue, 20 Jan 2026 14:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768919109; bh=YDDyyYB+YVCQQ3bOYUSgoPwx7V5Jm2aE0B8Vt/Q0AHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SY6i7aN+d9WOHv1eU7hTAHMOFXQ1yC4K6sV0MhiCE0y2LFGnxAYRZWUar+q1ekMgl sIhwIW+Rc977By+4dnmA/mmN/1CeTt66ZMIeFsA6P85HkRP2KmjcaGzBKtd74o4g72 XjX6iE0us1CYsNa0ieWfeV/AQiBVuWSuQseQ6yG3FArxQmmQGDo2idoZqnfIxePKLs BnffXXPVeC2BDkVKgyeh8OG5H8sS2E6eIakG6pgYIB+eQpeKNXnDgycg6Qyk7NIfcs p7XfYnOSDlfuFYlyqAQSWsbXe2MnZkpjraFNUORS2u28WBkvB3T/2jpM+FWJZ0570p etqskw12yQVfA== From: Chuck Lever To: Al Viro , 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 v6 11/16] f2fs: Add case sensitivity reporting to fileattr_get Date: Tue, 20 Jan 2026 09:24:34 -0500 Message-ID: <20260120142439.1821554-12-cel@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260120142439.1821554-1-cel@kernel.org> References: <20260120142439.1821554-1-cel@kernel.org> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever NFS and other remote filesystem protocols need to determine whether a local filesystem performs case-insensitive lookups so they can provide correct semantics to clients. Without this information, f2fs exports cannot properly advertise their filename case behavior. Report f2fs case sensitivity behavior via the FS_XFLAG_CASEFOLD flag. Like ext4, f2fs supports per-directory case folding via the casefold flag (IS_CASEFOLDED). Files are always case-preserving. Reviewed-by: Chao Yu Signed-off-by: Chuck Lever --- fs/f2fs/file.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d7047ca6b98d..91c255bbbf48 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -3439,6 +3439,13 @@ int f2fs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) if (f2fs_sb_has_project_quota(F2FS_I_SB(inode))) fa->fsx_projid = from_kprojid(&init_user_ns, fi->i_projid); + /* + * f2fs preserves case (the default). If this inode is a + * casefolded directory, report case-insensitive; otherwise + * report case-sensitive (standard POSIX behavior). + */ + if (IS_CASEFOLDED(inode)) + fa->fsx_xflags |= FS_XFLAG_CASEFOLD; return 0; } -- 2.52.0