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 476122D94BB; Wed, 14 Jan 2026 14:29:16 +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=1768400957; cv=none; b=O3LnLq6T/ga7lFETujA0C41IJQwasAH97z7Dw9OxjfB0S8qSXgEiML9WU1grVLSPlvajh/JN3l79vfzh+CgY77g3lV9OotSMfDnUOQwaIJ+WjYl6iyn9CJWylndRo4HXW0L4Lpgj5qxGMpZzzNlv8MPz4v/tBNF+KSEFtBIjgIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768400957; c=relaxed/simple; bh=gRv+sO1S3hrUFLKI3T4D9s/Q8NW2IImgEOr3ucFDdXg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TvIQmTNHunLaXdXPC1pLvZ2jGiAzsLVKjhOiDGcvSes5sdEHdCFkrtnFyZqVsqyFsjDHKFHNdLLKlB9AX1Ldctid6ZSiDu+X++STAsZRJm9rdm0DXD2oPUb3kmP764DCrfyGiXGiufBwI8/Rmkjq8pRK+/cq8p7gNcJeZmkZj8s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JMHK6Rp7; 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="JMHK6Rp7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FFD2C4CEF7; Wed, 14 Jan 2026 14:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768400956; bh=gRv+sO1S3hrUFLKI3T4D9s/Q8NW2IImgEOr3ucFDdXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JMHK6Rp7ljpQjifdF7vPQsTOMGAiTsVjXwAZTRJT0RoS+qcCo3UMvkC7xDa/IjB1d BZF/nqe+pL3+eCH9paYgA0gY618lalhSvgiyvDbeaubSLhSUfe8RSbcEypZCEe2oxe bUinciITMuW9VlVPuW+Y3UVWLizCdbDxGXpwEYhFxtVuNmI5cNygcYpGHBbitMJLG9 aYwHkruvGsR2g57wqLFEYJcvuPwVIk/alUeuykmec+lie6OpeIYTSjAKYHtVFEBxND 6DmS4qEbQ/SczibCpJVCa5NSEmfLjoNLLQpxS6R6bKukvvIHCkb0qTvbPNgd4qWyHC 4jp8k5bA+cnSA== 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 v4 05/16] hfs: Implement fileattr_get for case sensitivity Date: Wed, 14 Jan 2026 09:28:48 -0500 Message-ID: <20260114142900.3945054-6-cel@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260114142900.3945054-1-cel@kernel.org> References: <20260114142900.3945054-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 Report HFS case sensitivity behavior via the file_kattr boolean fields. HFS is always case-insensitive (using Mac OS Roman case folding) and always preserves case at rest. Reviewed-by: Viacheslav Dubeyko Signed-off-by: Chuck Lever --- fs/hfs/dir.c | 1 + fs/hfs/hfs_fs.h | 2 ++ fs/hfs/inode.c | 12 ++++++++++++ 3 files changed, 15 insertions(+) diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c index 86a6b317b474..552156896105 100644 --- a/fs/hfs/dir.c +++ b/fs/hfs/dir.c @@ -321,4 +321,5 @@ const struct inode_operations hfs_dir_inode_operations = { .rmdir = hfs_remove, .rename = hfs_rename, .setattr = hfs_inode_setattr, + .fileattr_get = hfs_fileattr_get, }; diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index e94dbc04a1e4..a25cdda8ab34 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h @@ -177,6 +177,8 @@ extern int hfs_get_block(struct inode *inode, sector_t block, extern const struct address_space_operations hfs_aops; extern const struct address_space_operations hfs_btree_aops; +struct file_kattr; +int hfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa); int hfs_write_begin(const struct kiocb *iocb, struct address_space *mapping, loff_t pos, unsigned int len, struct folio **foliop, void **fsdata); diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 524db1389737..c52bc52712eb 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "hfs_fs.h" #include "btree.h" @@ -698,6 +699,16 @@ static int hfs_file_fsync(struct file *filp, loff_t start, loff_t end, return ret; } +int hfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) +{ + /* + * HFS is always case-insensitive (using Mac OS Roman case + * folding). Case is preserved at rest (the default). + */ + fa->case_insensitive = true; + return 0; +} + static const struct file_operations hfs_file_operations = { .llseek = generic_file_llseek, .read_iter = generic_file_read_iter, @@ -714,4 +725,5 @@ static const struct inode_operations hfs_file_inode_operations = { .lookup = hfs_file_lookup, .setattr = hfs_inode_setattr, .listxattr = generic_listxattr, + .fileattr_get = hfs_fileattr_get, }; -- 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 7B9FED37E3B for ; Wed, 14 Jan 2026 14:29:30 +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=ZJlTTve8YoxZ3Wnuxp6ndflGm/oWWPaKKrSsaJ9T2/w=; b=Gvswi+fETfNGxYV0Q1kGZMlvQH VwJfXVJnZOL+pzukW3eHltahkhk74RCYO+FfGg1nXyIhSWm/4b3R50SPAujh/saLW1xjzqwYgeX9f 4WfjEWOpDrwpFiL/Jvux3lk6lrJFLR/5Z7hQTzdCswdBfFrBuaKnDZFS+sErbc4QLgvA=; Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vg1sI-000814-3t; Wed, 14 Jan 2026 14:29:30 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vg1sF-00080t-Ol for linux-f2fs-devel@lists.sourceforge.net; Wed, 14 Jan 2026 14:29:27 +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=s799cfNbg0U/OGdCXuRVPr+ywq5/CZ64Hjq4fRhBJqw=; b=fAChOoR8pZbzn6HU7zScor55Tr Zx5KTx2m2j7ifj/s1dF+XBtcTxxzvRlBAsOkMyn2IeW/1u1J64Zh0JMbaq4vSNF/vizCHa5YeJ430 6UC/n+RqV5zJTeZjFkp2j1XPU3OvXWZqmLLw8SRevM++VvbatWfgy07Fp7vp4InSjxy8=; 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=s799cfNbg0U/OGdCXuRVPr+ywq5/CZ64Hjq4fRhBJqw=; b=TTir8rAkF0W/HCJWoMnEh+ms/v J2oPDZy6zVOaxwoW9gjMJpCCfuFboQDsVN39vagmAf3lEiwzzv3wLZSzYFD38A8XPVXV9XcyRpZYw sylkmvaDC60bfzoCIeQeVboS35y9p2e/oyxW4sCpb1SK3g8lkWwQw57TkYEt6GCT4QwE=; Received: from sea.source.kernel.org ([172.234.252.31]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vg1sF-0001GA-AO for linux-f2fs-devel@lists.sourceforge.net; Wed, 14 Jan 2026 14:29:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 029AE440F0; Wed, 14 Jan 2026 14:29:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FFD2C4CEF7; Wed, 14 Jan 2026 14:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768400956; bh=gRv+sO1S3hrUFLKI3T4D9s/Q8NW2IImgEOr3ucFDdXg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JMHK6Rp7ljpQjifdF7vPQsTOMGAiTsVjXwAZTRJT0RoS+qcCo3UMvkC7xDa/IjB1d BZF/nqe+pL3+eCH9paYgA0gY618lalhSvgiyvDbeaubSLhSUfe8RSbcEypZCEe2oxe bUinciITMuW9VlVPuW+Y3UVWLizCdbDxGXpwEYhFxtVuNmI5cNygcYpGHBbitMJLG9 aYwHkruvGsR2g57wqLFEYJcvuPwVIk/alUeuykmec+lie6OpeIYTSjAKYHtVFEBxND 6DmS4qEbQ/SczibCpJVCa5NSEmfLjoNLLQpxS6R6bKukvvIHCkb0qTvbPNgd4qWyHC 4jp8k5bA+cnSA== To: vira, Christian Brauner , Jan Kara Date: Wed, 14 Jan 2026 09:28:48 -0500 Message-ID: <20260114142900.3945054-6-cel@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260114142900.3945054-1-cel@kernel.org> References: <20260114142900.3945054-1-cel@kernel.org> MIME-Version: 1.0 X-Headers-End: 1vg1sF-0001GA-AO Subject: [f2fs-dev] [PATCH v4 05/16] hfs: Implement fileattr_get for case sensitivity 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 Report HFS case sensitivity behavior via the file_kattr boolean fields. HFS is always case-insensitive (using Mac OS Roman case folding) and always preserves case at rest. Reviewed-by: Viacheslav Dubeyko Signed-off-by: Chuck Lever --- fs/hfs/dir.c | 1 + fs/hfs/hfs_fs.h | 2 ++ fs/hfs/inode.c | 12 ++++++++++++ 3 files changed, 15 insertions(+) diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c index 86a6b317b474..552156896105 100644 --- a/fs/hfs/dir.c +++ b/fs/hfs/dir.c @@ -321,4 +321,5 @@ const struct inode_operations hfs_dir_inode_operations = { .rmdir = hfs_remove, .rename = hfs_rename, .setattr = hfs_inode_setattr, + .fileattr_get = hfs_fileattr_get, }; diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h index e94dbc04a1e4..a25cdda8ab34 100644 --- a/fs/hfs/hfs_fs.h +++ b/fs/hfs/hfs_fs.h @@ -177,6 +177,8 @@ extern int hfs_get_block(struct inode *inode, sector_t block, extern const struct address_space_operations hfs_aops; extern const struct address_space_operations hfs_btree_aops; +struct file_kattr; +int hfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa); int hfs_write_begin(const struct kiocb *iocb, struct address_space *mapping, loff_t pos, unsigned int len, struct folio **foliop, void **fsdata); diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index 524db1389737..c52bc52712eb 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "hfs_fs.h" #include "btree.h" @@ -698,6 +699,16 @@ static int hfs_file_fsync(struct file *filp, loff_t start, loff_t end, return ret; } +int hfs_fileattr_get(struct dentry *dentry, struct file_kattr *fa) +{ + /* + * HFS is always case-insensitive (using Mac OS Roman case + * folding). Case is preserved at rest (the default). + */ + fa->case_insensitive = true; + return 0; +} + static const struct file_operations hfs_file_operations = { .llseek = generic_file_llseek, .read_iter = generic_file_read_iter, @@ -714,4 +725,5 @@ static const struct inode_operations hfs_file_inode_operations = { .lookup = hfs_file_lookup, .setattr = hfs_inode_setattr, .listxattr = generic_listxattr, + .fileattr_get = hfs_fileattr_get, }; -- 2.52.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel