Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2075743ybk; Mon, 11 May 2020 11:19:28 -0700 (PDT) X-Google-Smtp-Source: APiQypJ1auRRUMxT3EfpkzvTpZ2y2cNXhbRvzp8OwCL4eQduzHyoW/AAp81zwWmOXw7CPJ+A/1ob X-Received: by 2002:a50:f390:: with SMTP id g16mr14137680edm.211.1589221168170; Mon, 11 May 2020 11:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589221168; cv=none; d=google.com; s=arc-20160816; b=xK3aZc2HlGBjjDURgV2Ma8zGCaMF3OqNUioGun7t2ehWG7F7w2ULudD2kW1RjOk3Z2 4oFm+SmmcWzygjSM+X8wWrewsifa0TlGTVVmyWku7GAv0MK7W62/CP6C2GepyTtPEkTj IWHK+AvkGgJFC5BOfVRAfvw41ZUsUzXdlgMlCCv4P9WOYVzYY/pbvYqZMolAh4x2A/7X 8xdH8X7cvoBKiACvtFejFsTzfvQxVDsHiFBBImjTrsfTk0a9TB29WQUI8o1X4PGdgefr P6K035Q6txQkUG2f7CM1stTDKLRAJu8R7rgtDATt7IaVnEZGnDNeSHziQfK0B1SEnPeR toRw== 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:to:date; bh=2dbfp4FOhJ0q7sn6CIUNE2xkN1I1Qp9FFM3c9b/s8js=; b=kgy5k6TWVr+paljinHF6gamwxwe1xx0znwwl6dLcX3YC1vjYy/8WAhkOH55/R1WzzW hkXcXuoMxleaxwz6DFOxHmR6YEo2hjBaI6fPBxRuryct7B/zCJhbK0/D8Vfp6B5HojEf S0KW2r+y+K/96DdAuKtdFyiC46+0MtnX2dcaInjNU7kADk8fJT+/HyGTRVgnrOVQTvrq m3GKHaQdT75avtUa9C5ucrzDtUc1UDgK1S+QkAAUgxlZpb95+PO8ev+o1s/64zdlNVbQ EJiS56mJo9GsshsGl35FL7GyES0eIbd4HRZtbUJliIHqd5lyyh+Z0QOm3JtWNmFq/Y0J Z08w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si6292657ejr.400.2020.05.11.11.19.03; Mon, 11 May 2020 11:19:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729798AbgEKSSQ (ORCPT + 99 others); Mon, 11 May 2020 14:18:16 -0400 Received: from fieldses.org ([173.255.197.46]:54828 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729768AbgEKSSQ (ORCPT ); Mon, 11 May 2020 14:18:16 -0400 Received: by fieldses.org (Postfix, from userid 2815) id F407B709; Mon, 11 May 2020 14:18:15 -0400 (EDT) Date: Mon, 11 May 2020 14:18:15 -0400 To: linux-nfs@vger.kernel.org Subject: [PATCH] nfsd4: remove "client testing stateid" log spam Message-ID: <20200511181815.GK8629@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" I try not to log even buggy client behavior by default, as I'd rather not give malicious clients a way to spam the logs. But this condition isn't even a sign of a buggy client--in recovery cases it's normal to test stateid's from a no-longer-active clientid. I'd be open to dprintk's or tracing here if people think it's necessary. For now, just remove this. Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4state.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 65cfe9ab47be..e7a592f0a27e 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -5521,15 +5521,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.26.2