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 6A6F4C001DC for ; Sat, 29 Jul 2023 04:34:33 +0000 (UTC) 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 1qPbex-0002B7-PZ; Sat, 29 Jul 2023 04:34:32 +0000 Received: from [172.30.20.202] (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 1qPbew-0002B1-M4 for linux-f2fs-devel@lists.sourceforge.net; Sat, 29 Jul 2023 04:34:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: 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=3AUsvTueriGvbombNj0OdNfmPYeyzOGl16zWi9DCfCs=; b=EnoJKBOQivUyo0yi7HNQcpp3b+ LjtpKJHQUJyclawNjiTBzEb3D9nhVhaqHTcNRidX9LdB0yLp+ZMFqrM89cRdG9X44Je74cMu1rmsL 2M6sbgRBN3byRRk3y517w+DWgecDFIP8QKqgIPge7hc3zzpZRDVCk22fLkLmuXcgCJ0A=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding: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=3AUsvTueriGvbombNj0OdNfmPYeyzOGl16zWi9DCfCs=; b=hl6IKxGz7V6vxCVGXcwFrRLbja dOwXytR1d9KWTcQUVTIwUUDAbjNZILUBCr36MtBEsqxDh6eMQokeUphkjxS8j0ymxibQBtdle6Q0Q VLxdQi29vlpJGFPMYJ/0uyJ6y+qOhvbjpb1fpukH/C6VpfnKeU+ewSO9tSdgcfNKPH+U=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qPbew-0005iQ-Dl for linux-f2fs-devel@lists.sourceforge.net; Sat, 29 Jul 2023 04:34:31 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B573E60C1C; Sat, 29 Jul 2023 04:34:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C35BAC433C8; Sat, 29 Jul 2023 04:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690605264; bh=kreUmZhVx1mtOQtL4BLyEky6B76tt7CikJVFHDwTUDM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E3ACFzB5JU4CZFIy3kz5qW/uEJymTZKy9b8a0ZW6k16Rv+cJORCna0dpWt/V/2PIN CcGK8y6VM1KgA2fU/WGBEhbjCepAo7/4KzC268LgpvYlL91cuzE0KN7I1W2BC6o0HK 69PyzjLspVEBL2ZJ1C83qA4a8scAJXxGtATEH+OP7dTsG4F9GIsrEbEHxUysLaMMjG ximW/8wk6s2jgrpkrPgeQWZ+sPVT3ToqMYGOMc8zhNvDc3KA6c+wbhCBiTg5x8tnTi ST7BFkCgusvLK0zV0tIF9vbJv8eowSdcQVADWu44x9Dnc5Qy2NbWf6bSJrJaU4zE3b jdumDe3n3xakQ== Date: Fri, 28 Jul 2023 21:34:22 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Message-ID: <20230729043422.GC4171@sol.localdomain> References: <20230727172843.20542-1-krisman@suse.de> <20230727172843.20542-3-krisman@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230727172843.20542-3-krisman@suse.de> X-Headers-End: 1qPbew-0005iQ-Dl Subject: Re: [f2fs-dev] [PATCH v4 2/7] fs: Add DCACHE_CASEFOLDED_NAME flag 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: , Cc: brauner@kernel.org, tytso@mit.edu, linux-f2fs-devel@lists.sourceforge.net, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, jaegeuk@kernel.org, linux-ext4@vger.kernel.org, Gabriel Krisman Bertazi Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Thu, Jul 27, 2023 at 01:28:38PM -0400, Gabriel Krisman Bertazi wrote: > From: Gabriel Krisman Bertazi > > This flag marks a negative or positive dentry as being created after a > case-insensitive lookup operation. It is useful to differentiate > dentries this way to detect whether the negative dentry can be trusted > during a case-insensitive lookup. > > Reviewed-by: Theodore Ts'o > Signed-off-by: Gabriel Krisman Bertazi > > --- > Changes since v2: > - Rename DCACHE_CASEFOLD_LOOKUP -> DCACHE_CASEFOLDED_NAME (Eric) > --- > fs/dcache.c | 8 ++++++++ > include/linux/dcache.h | 8 ++++++++ > 2 files changed, 16 insertions(+) > > diff --git a/fs/dcache.c b/fs/dcache.c > index 98521862e58a..5791489b589f 100644 > --- a/fs/dcache.c > +++ b/fs/dcache.c > @@ -1958,6 +1958,14 @@ void d_set_fallthru(struct dentry *dentry) > } > EXPORT_SYMBOL(d_set_fallthru); > > +void d_set_casefold_lookup(struct dentry *dentry) > +{ > + spin_lock(&dentry->d_lock); > + dentry->d_flags |= DCACHE_CASEFOLDED_NAME; > + spin_unlock(&dentry->d_lock); > +} > +EXPORT_SYMBOL(d_set_casefold_lookup); d_set_casefolded_name() > +static inline bool d_is_casefold_lookup(const struct dentry *dentry) > +{ > + return dentry->d_flags & DCACHE_CASEFOLDED_NAME; > +} d_is_casefolded_name(). Or even better, just write 'dentry->d_flags & DCACHE_CASEFOLDED_NAME' directly in the one place that actually needs this? - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel