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 F040AE9A03E for ; Tue, 17 Feb 2026 21:48:09 +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=DhJBGR++zFxbv2TvzBOCgeykwQam/18Q1+P31PdsdMo=; b=BRrB9UYTTOb1zCZ50+mgL446Ja WPMRkO0erDL3AA7D5QWth6SWza24o81sX9cAgf1UmOluu+GpKqJvAZhJM5wASxJPLQdtj1B22oUZx XqQ+mI6tZRpQAhpfHOMir3FNjHYHZjgDxtu6fM/gX7JIOW0LEcRzP7uvtsbfJZrEcD2g=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vsSvR-00074u-J6; Tue, 17 Feb 2026 21:48:09 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vsSvP-00074h-4x for linux-f2fs-devel@lists.sourceforge.net; Tue, 17 Feb 2026 21:48:07 +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=9CisdraOAaF4FZeoCGaW9d/TvwT+5wEXWSNQWHo4LS8=; b=aO1XBtirPK0rq853vf++hVMZ2z NedsMltBl03V1DFCMTbAztIFQ1rZPMMv1/5adgAFV7h0IRpCf4EmjvQCeLjVCo4uOBQwFxvGls39v d0v79/xtcFOvUVUq7b3ffp3l3tpE8EGW49ZkOlkVFGl3JDpEEv/EwSNAr0cnHXU0jNAw=; 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=9CisdraOAaF4FZeoCGaW9d/TvwT+5wEXWSNQWHo4LS8=; b=LTnIsZYc4jMsqorh4i/6VjMgne 46816q9BoMEAPDdeigJyUXPIhe+swkmrGUtJldt1HSrslxwcV8Y1+kHTE9/kw9BGrllkmQyEnUafR maVjTksAMbVmNbW8gXQqpdujznqDr8OzYt3I7tJO2PD1qoS2nqz3ljALfXj4mJ/LN83Q=; 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 1vsSvO-0002sS-MJ for linux-f2fs-devel@lists.sourceforge.net; Tue, 17 Feb 2026 21:48:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 6754F405FD; Tue, 17 Feb 2026 21:48:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0994FC19423; Tue, 17 Feb 2026 21:47:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771364881; bh=yS7ttuYwzHepG/z83tSUH0NgHRyTHV6OlDbQ8JRzYTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F0tcFrm+ygZycs9N8dJQtgnOLZX7H9QkIyBoYIwRLNg9Vs+NwJ3bCs1CWyitNVeTf E1f7UQID3ghZm2dZYsLpd/ZPxFv7OP54vWGsEP9vWH3T6x2PubKDcnhwaaJjyMxQ58 lZbFctpSF+nvvcBcSW/R2n/70xC+Wk9HdpSiCWoOggBh4f//tdFbylOsTUHzc78M5l VxDL9CBPo0RKii+BR1KSjZIDsG7wgdgVDG21SevZbRRe8mH2rl7WldSxTMnteYLyi/ Kt3dYj84jSagWCZ4yRCnSiW56oz09e4nj7w3/RWIMoHoIWOslSdzg6PzAGY2hNH1CD ZY9hm6ANZ971A== To: Al Viro , Christian Brauner , Jan Kara Date: Tue, 17 Feb 2026 16:47:30 -0500 Message-ID: <20260217214741.1928576-7-cel@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260217214741.1928576-1-cel@kernel.org> References: <20260217214741.1928576-1-cel@kernel.org> MIME-Version: 1.0 X-Headers-End: 1vsSvO-0002sS-MJ Subject: [f2fs-dev] [PATCH v8 06/17] 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-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 Report HFS case sensitivity behavior via the FS_XFLAG_CASEFOLD flag. 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 | 13 +++++++++++++ 3 files changed, 16 insertions(+) diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c index 0c615c078650..f85ef69a8375 100644 --- a/fs/hfs/dir.c +++ b/fs/hfs/dir.c @@ -328,4 +328,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 ac0e83f77a0f..1b23448c9a48 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 878535db64d6..b3e6e46ddd14 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" @@ -716,6 +717,17 @@ 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) +{ + /* + * Report case-insensitive behavior: all name comparisons use + * Mac OS Roman case folding. FS_XFLAG_CASENONPRESERVING remains + * unset because original case is preserved on disk. + */ + fa->fsx_xflags |= FS_XFLAG_CASEFOLD; + return 0; +} + static const struct file_operations hfs_file_operations = { .llseek = generic_file_llseek, .read_iter = generic_file_read_iter, @@ -732,4 +744,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.53.0 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel