Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4395014pxb; Mon, 21 Feb 2022 20:10:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfxxQDKXpBKCZquK11qePyuwEaHhluzmrjwUrTbtTrqICyv1tx9Uy+opvuX+mzwO90VBy2 X-Received: by 2002:a63:e854:0:b0:372:fa33:c0a4 with SMTP id a20-20020a63e854000000b00372fa33c0a4mr18351706pgk.379.1645503019050; Mon, 21 Feb 2022 20:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645503019; cv=none; d=google.com; s=arc-20160816; b=lH7Dsi62KfPVj/lR5D543FYDqblH2MPAaR6wLWgnJFDKiRLz9bG8C4iYqhAaNIAdU0 WWstz2GE2InBSgGIXPzKR+VGCKfp40b3HA66/hHOntO4ZijVhm5AYkge6866GvO/jvs7 prP/4WLMpFAOlnrsPM05c2DW3g92l3zIziAYyHD3y2Z2ITabvRWz1RxYmnklIQvS/cjI ub6T4+0dOuY62e07QNIFbQ/kms4gH5lJjxiIXDQXDrhWoTsg97korUCyQyKHEszjKZlP 3bnmWd0qXclZm85QHGvXoQfDaoUJVf1zJ/PTyC8Sxt8bErmc4x74lWy655j8FdXbeId/ kZbg== 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=DJ4bjNbvY403xqmvEUM8r07h8TEWs53N8qdoDsjl2Gk=; b=G6P24s9WjcpfodJ8D0S3sZwrqiUtIg/LvhNxULjVIYcvEyEXg23qVt+OJSo8F/ANu9 R2Z/EVlHGODO5Ul5cLtISdSKXUNySLLh65DPd5KGl8qFXMgVRX1Blb2xoza9EexNekdT jo0FiCDWxhJ/8/8qiZWQ9MIF2+D9sQfToiy7qLLxvcKy/Kywo5cAR6MNHcpARJMT26sR XtfH0yGKv08klWNKXw7AdaYP7bratPtXsrHw5LJQVBxsgKVEt6eO5BYN/pDsQX8ot9N5 UqgI2be2ntO70tlUjWyRACO5IUhjrnhIigC5ZvQGGuaSE0q5xB0w6mvvVn27/CHzxG5B waTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ERRWCUUN; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id r10si30950086plo.33.2022.02.21.20.10.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:10:19 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ERRWCUUN; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 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 505A8710C1; Mon, 21 Feb 2022 20:10:09 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379983AbiBUQP1 (ORCPT + 99 others); Mon, 21 Feb 2022 11:15:27 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379987AbiBUQPZ (ORCPT ); Mon, 21 Feb 2022 11:15:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F13427B07 for ; Mon, 21 Feb 2022 08:15:02 -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 ams.source.kernel.org (Postfix) with ESMTPS id 588BFB81257 for ; Mon, 21 Feb 2022 16:15:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E78ACC340F3 for ; Mon, 21 Feb 2022 16:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645460100; bh=C9FY7JQKBoL8OHLdydu8B5k+jIdHYV7qILcMGC1n+cI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ERRWCUUNXmbuGmudnBvDsGtoi+LFiFkdiH3Oi1Rk35jvZnn6YtQ4LpZB5d6grh4co 2/2yNrXRnhUWlzSxi0Lqdf8s4DrGjfsbyeI8dq9niXhDYR7EYwD7i7aeLo5Wr5+G3k 8l87KeP4kxyaTA1QfiIk1b1aG7h4zO2PSI9rLBJYbCLvfo09poGTIhv5YZotRVDKEF NvY/prWa6YwKE/iNu+xx3mnIDsGTa72P46JQhB1XPtQDtTj/vyfZgVVL9xsAZ7MJUA Pe1QjtcQFsaQ3LtI55F3SQ2WPFqhHsdDxDQ60IkEx6svgVUtPVdL3Pp1joe9oO0lvZ mtpIrIaPK2orw== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v6 02/13] NFS: Trace lookup revalidation failure Date: Mon, 21 Feb 2022 11:08:40 -0500 Message-Id: <20220221160851.15508-3-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221160851.15508-2-trondmy@kernel.org> References: <20220221160851.15508-1-trondmy@kernel.org> <20220221160851.15508-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 8b190c8e4a45..8e750ef34559 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