Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1075806pxm; Wed, 23 Feb 2022 17:29:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyV0gcr+0oP7UDMJu2ygtFAhFXKM29ZVw1HrJ2McAVS2Ka8qlsip9Kz39AcqNnEx9jp/o3W X-Received: by 2002:a17:90a:5402:b0:1b9:68e8:282e with SMTP id z2-20020a17090a540200b001b968e8282emr364282pjh.62.1645666166095; Wed, 23 Feb 2022 17:29:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645666166; cv=none; d=google.com; s=arc-20160816; b=LvS/9qRNeh0FvsgQ35wbTMtgV1urf9nuv8RkeshboMxQ5zGWtNA/ihuvGCUxmYq6BW 32BXsE86GfBmsbZ5xeWIAUM0ZuWrX0VPM8oF88w3s+0a9z3yF/SkxMomqKdeEuKcWelr cxMguPUkIMWl54c3LfRjEr2fdpZE0G5DzggjPs2HYzE5zyLbLC8EjEgyarY4669fiwcE d2HfnNFrvlp16o+fHAdRw7v5dSsYfavcQBEFc6oo9Q/aPJ2PNBvxbK7avWYP4F+w8f7l 5+/Rs1vR0gyoKxOi8W0QVh4yxpc8QZrsupLrdLRZ5aFHaHEhiSgCKH8gCwqpDtRg/Iwr +KbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=agfwdeQlbtM6sxDf+Wqj96fkvT4FJS7D8Vao3NfQvo8=; b=Dnlf4Tk8OEte7foFyP3cFT2tcRzgzCirNU18NyT3MZAVA/8lPHC0riwoTAfdxUvEMI 45WcHBLTjtbqYxqPVFR9sskbaZUVB1VIL1Gldhr3IXMtbnPbGjTs3PX4U0R/IZlG7NK+ 1GCyUtm15iLn4eAuMGkdiibxNfkQueWMNaR6rS9NI16W4LO5EihOZA0jTXlWwI09hjAH 9AavjzKAKruZiuEts1qg24vyjlDVfJCT+UCGS35hgb51SYKoHMTpZtwqgOuaNbO44l1d hzZT9z4h0MCGY2cvYPW8bNQxCG811PmVHWSOzUEGB7e8WjHws+suNG4cMY52lGfBhMAZ n/bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a/t3qLqs"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r3si1054723pjd.45.2022.02.23.17.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:29:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="a/t3qLqs"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1D1111168FE; Wed, 23 Feb 2022 17:10:15 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242313AbiBWVUC (ORCPT + 99 others); Wed, 23 Feb 2022 16:20:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241417AbiBWVUB (ORCPT ); Wed, 23 Feb 2022 16:20:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B0D04EA0A for ; Wed, 23 Feb 2022 13:19:33 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1599561650 for ; Wed, 23 Feb 2022 21:19:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B665C340F1 for ; Wed, 23 Feb 2022 21:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645651172; bh=AU/1BuAYIRPvCSJMRaL7bK15l0+X1t9HvSCk7ukL0FY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=a/t3qLqs2ThixYWZ3AgOZPm5yZ1lxK25+IV13TdqIxy/88Iwq89gJ3qqXCT7tUlQP bekjRJVhkqTJ8UbwKPJ7tB38aohKHPmo52NUzb5FTdIPgtPANN9k3lIqKyXUGtC++x elSHNFc6fw9qyehPSWqKsw0MYPFCgux2dF9C7K5wsdRfaHaoNwrY6EtQOu7oprXfih zAkAPR1KTsoKgyubyVRVfPAG6e8TE7B5398PIy0RkCAs79dTLYxF11f3kUMtMLeakH ez0pOovRsFkgbhQu2nHEBLWgmUgyAXHeOCgHRter+WZIoTbpjItXIISyBEzHAtTm0C E5nA/HsyKoDlQ== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v7 02/21] NFS: Trace lookup revalidation failure Date: Wed, 23 Feb 2022 16:12:46 -0500 Message-Id: <20220223211305.296816-3-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220223211305.296816-2-trondmy@kernel.org> References: <20220223211305.296816-1-trondmy@kernel.org> <20220223211305.296816-2-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust Enable tracing of lookup revalidation failures. Signed-off-by: Trond Myklebust --- fs/nfs/dir.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index ebddc736eac2..1aa55cac9d9a 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1474,9 +1474,7 @@ nfs_lookup_revalidate_done(struct inode *dir, struct dentry *dentry, { switch (error) { case 1: - dfprintk(LOOKUPCACHE, "NFS: %s(%pd2) is valid\n", - __func__, dentry); - return 1; + break; case 0: /* * We can't d_drop the root of a disconnected tree: @@ -1485,13 +1483,10 @@ nfs_lookup_revalidate_done(struct inode *dir, struct dentry *dentry, * inodes on unmount and further oopses. */ if (inode && IS_ROOT(dentry)) - return 1; - dfprintk(LOOKUPCACHE, "NFS: %s(%pd2) is invalid\n", - __func__, dentry); - return 0; + error = 1; + break; } - dfprintk(LOOKUPCACHE, "NFS: %s(%pd2) lookup returned error %d\n", - __func__, dentry, error); + trace_nfs_lookup_revalidate_exit(dir, dentry, 0, error); return error; } @@ -1623,9 +1618,7 @@ nfs_do_lookup_revalidate(struct inode *dir, struct dentry *dentry, goto out_bad; trace_nfs_lookup_revalidate_enter(dir, dentry, flags); - error = nfs_lookup_revalidate_dentry(dir, dentry, inode); - trace_nfs_lookup_revalidate_exit(dir, dentry, flags, error); - return error; + return nfs_lookup_revalidate_dentry(dir, dentry, inode); out_valid: return nfs_lookup_revalidate_done(dir, dentry, inode, 1); out_bad: -- 2.35.1