Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp547697pja; Thu, 19 Mar 2020 07:19:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvr4ufPxLrNTSKY/ncODA0R8Xne7HMEclnRG09bMPzVtqIyl28U78K0QrfFyJLvIwOihOD+ X-Received: by 2002:a05:6830:23b6:: with SMTP id m22mr2456137ots.225.1584627574931; Thu, 19 Mar 2020 07:19:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584627574; cv=none; d=google.com; s=arc-20160816; b=rwt85558Wf8UDm4f0UhvQ9oJmNZjT3zDXap5tpeoID9v1+wzgNSrz/WW+lLJMZzkgX 3nHJr1JHS8//oWFA5qH9DzpEwNbz8phi/VlxwGXNiy3i9XExRwSCZAJBdJxSz3Gv63Kn uv5qd/2JxAOw6GeMvA8fx+VNRbtdRNn8tCcupL1f+0YNuR5rWoJ/ZkJvkC5Iw+6azsQi 3MtA0afYNdnu1qoCGVkmHOJR/Cdag/TvlcouZ84JSJsUBn2bd9edOaxGVp5NMsPtiBUk 0wNoi4kFyprO98AoUC4vOQFOqHga1028FNNiEgyRlGgDehirWKuQ0qv2tA0UdFFBX/tr s38A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:content-disposition :mime-version:message-id:subject:cc:to:date; bh=60232SX7V3Gc25R06eizkkdtcEt5Nv0L+TegQFkwdXI=; b=H7NhT5Pz1lhXdvwdW/WEngs8lXvyQp8p7kuHBz0C6n7mK1/BhDWaZpVUgkgrLmMiXd IZjZpsADGIXApgaY45rGluKkjn/ORyGPRXzIZGYW06x7b5SOfj9TYKhdnzwK8clwl/h1 vLqVrmY1ypvIKlBB2eZe+AhKnRTHr+EZocxHefFl3nI3O3J29ZZM2P+rbPwwfvbkMW19 uIjVZA+WAqL6xiqbP3xK/p0TMGCN7gj/XUPpmQITIorY9BkpLGu2D06FCEyIijiY25eT KNVzZ8NypXOuCgpeyAycahediZA1BO7ww9VtMI5GJMl7hRSRhBueZpInH4vUx/g0vwrf GqwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j84si1176061oia.126.2020.03.19.07.18.54; Thu, 19 Mar 2020 07:19:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbgCSOSt (ORCPT + 99 others); Thu, 19 Mar 2020 10:18:49 -0400 Received: from fieldses.org ([173.255.197.46]:46672 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbgCSOSt (ORCPT ); Thu, 19 Mar 2020 10:18:49 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 1361CBD1; Thu, 19 Mar 2020 10:18:49 -0400 (EDT) Date: Thu, 19 Mar 2020 10:18:49 -0400 To: Chuck Lever Cc: linux-nfs@vger.kernel.org Subject: [PATCH] nfsd4: kill warnings on testing stateids with mismatched clientids Message-ID: <20200319141849.GB1546@fieldses.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: "J. Bruce Fields" It's normal for a client to test a stateid from a previous instance, e.g. after a network partition. Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4state.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) I'm not a fan of printk's even on buggy client behavior. I guess it could be a dprintk. I'm not sure it adds much over information you could get at some other layer, e.g. from a network trace. diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index c1f347bbf8f4..927cfb9d2204 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5522,15 +5522,8 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid) if (ZERO_STATEID(stateid) || ONE_STATEID(stateid) || CLOSE_STATEID(stateid)) return status; - /* Client debugging aid. */ - if (!same_clid(&stateid->si_opaque.so_clid, &cl->cl_clientid)) { - char addr_str[INET6_ADDRSTRLEN]; - rpc_ntop((struct sockaddr *)&cl->cl_addr, addr_str, - sizeof(addr_str)); - pr_warn_ratelimited("NFSD: client %s testing state ID " - "with incorrect client ID\n", addr_str); + if (!same_clid(&stateid->si_opaque.so_clid, &cl->cl_clientid)) return status; - } spin_lock(&cl->cl_lock); s = find_stateid_locked(cl, stateid); if (!s) -- 2.25.1