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 B8FB0EB64DA for ; Fri, 14 Jul 2023 05:49:36 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qKBgN-0003v8-Qe; Fri, 14 Jul 2023 05:49:34 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qKBgM-0003v2-Fi for linux-f2fs-devel@lists.sourceforge.net; Fri, 14 Jul 2023 05:49:33 +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=SHcPWexzbWLR6et3TqJdT5GImKuE8Je85P9KdC6KhHQ=; b=myomMVkaDlfXWDV3TIacQyNfNe kb34jvIjoX9t7dmu1pgkV5xOhy7K3uvj5q5SLInIlV6Fe74nKvuHDNRyxpR4NGr75CQec/RQsBurJ M8qpcXstWRxYiSNycpVjnjZF+FEaPAyPaUm2lr6vIela1X7xQihLrFq0EqBAsHz5Txrw=; 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=SHcPWexzbWLR6et3TqJdT5GImKuE8Je85P9KdC6KhHQ=; b=ORG7ga2BA04Rga0v59nryQ5Y2x hl6yigTCtF+qHiVXl0+SHI3T7j/Lf3VDiHirKbWs9AuU6X9iuJsDA+bnBom3hyL0wgw5ns1HL8IY9 seJzXl1n+dk3FATLiOIA8BDFDxBHXX8ELO2hDf+54XqNAREF7sYvD9abtPeGN7Uf5sxU=; 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 1qKBgM-0000d3-R1 for linux-f2fs-devel@lists.sourceforge.net; Fri, 14 Jul 2023 05:49:33 +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 2301861C15; Fri, 14 Jul 2023 05:49:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49121C433C8; Fri, 14 Jul 2023 05:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689313766; bh=7DnQ3lPm58MYsorHdkMUvAqvzRj0azqqi5D765n2mkg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S579h9VF/gTjL7FvtkLYx19YYonmDP7oeWhNKTLavRhs6b3XqYHgciC57V+g2JAc6 XDYLHNlyHIPB90N1QlVqUjNVjTxyaOg6ZCus0W7CSpPcYIuqXGgDChAB8aTb7TWtxC A2pqs2CMuucrYF7hFG6kcldXkI/W7HCnK06IDecW3moef29b2zPcK4doO2IUvh4Ydi 0igEQZt+pNQk3PsQyt1sm21qdsqaiCQ3xvKjameBVU14iiQVByJpgZfhVWgrRIZvu3 NRr/X6QyILlYhdnE6gydOJpJvUQX0oua2oHDN7N+GHaEOqaB3yLnswxVELldGyWbkQ MFzFnxcJJdtjw== Date: Thu, 13 Jul 2023 22:49:24 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Message-ID: <20230714054924.GF913@sol.localdomain> References: <20230422000310.1802-1-krisman@suse.de> <20230422000310.1802-8-krisman@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230422000310.1802-8-krisman@suse.de> X-Headers-End: 1qKBgM-0000d3-R1 Subject: Re: [f2fs-dev] [PATCH v2 7/7] f2fs: Enable negative dentries on case-insensitive lookup 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Fri, Apr 21, 2023 at 08:03:10PM -0400, Gabriel Krisman Bertazi wrote: > From: Gabriel Krisman Bertazi > > Instead of invalidating negative dentries during case-insensitive > lookups, mark them as such and let them be added to the dcache. > d_ci_revalidate is able to properly filter them out if necessary based > on the dentry casefold flag. > > Signed-off-by: Gabriel Krisman Bertazi > --- > fs/f2fs/namei.c | 23 ++--------------------- > 1 file changed, 2 insertions(+), 21 deletions(-) > > diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c > index 11fc4c8036a9..57ca7ea86509 100644 > --- a/fs/f2fs/namei.c > +++ b/fs/f2fs/namei.c > @@ -564,17 +564,8 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry, > goto out_iput; > } > out_splice: > -#if IS_ENABLED(CONFIG_UNICODE) > - if (!inode && IS_CASEFOLDED(dir)) { > - /* Eventually we want to call d_add_ci(dentry, NULL) > - * for negative dentries in the encoding case as > - * well. For now, prevent the negative dentry > - * from being cached. > - */ > - trace_f2fs_lookup_end(dir, dentry, ino, err); > - return NULL; > - } > -#endif > + if (IS_ENABLED(CONFIG_UNICODE) && IS_CASEFOLDED(dir)) > + d_set_casefold_lookup(dentry); I wonder if a more consistent place for the above code would be earlier in f2fs_lookup(), next to the call to generic_set_encrypted_ci_d_ops()? That's where the dentry_operations are set. It's also next to f2fs_prepare_lookup() which is where DCACHE_NOKEY_NAME gets set if needed. - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel