Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4774594rwb; Mon, 8 Aug 2022 06:55:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR7jCVt331FPhyd5T5JLhje6po1shika2FR2jfUktQ/6t8jSuw45UWJ87B7IJ/q0YbKUgcnT X-Received: by 2002:a05:6402:51d4:b0:43d:9c8e:2617 with SMTP id r20-20020a05640251d400b0043d9c8e2617mr18532663edd.146.1659966937430; Mon, 08 Aug 2022 06:55:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659966937; cv=none; d=google.com; s=arc-20160816; b=CHBiNayej0cIaX445YGt2nw/XKsBazdB43diA6qkJmzk1Wz/IUyfb3QA8+gYFXcsmG oQvCx5lthDsRAXMeg8mho0vQL+07dZphKWxr6/geNthMZsmPLkLktusgZbzlY1RhMWd9 Bw1oSR7rwgTgAbBguygUsApWhig7dbfHJLAa95sddOmJ8teeQzwAWhnkKoots7C0CQIW LeIp1LRSCu7s95udRxU1A3HDKHI/RtbwRBGXw7nNdxv/ocyiFuNR8ADVSq+xKyYa7gfJ rz0Wt9mB8FQUzoax/EMDhwYTYD6nK1OW3EBCSwzIvFBFthjiU/LmZ5L7Jrp8BRqCHfp9 Batg== 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 :user-agent:references:in-reply-to:message-id:date:to:from:subject; bh=/SAduQX+1F1vOpnNNpwuDj4CvgzmMFEkvVMirTviTAk=; b=0Iii0iZCtkjtRjJ+BNffUzKV3/rJemiw1J18jF80N3P1gl9akcnhrQAnNYsbzMNv7H llOgZZozxuBzqZsow76xaMLcnDaYogwhycH3twd/EfpJ9dguGGVM0PC+cQnemq0BYcLX fJQQJujc1Iy+msN4Smf1YcDc8pP8ZsPBrBf/roS5+fL2XN6t4x0QqL9OBLz3HnRLbmgh kU+f7kLqByqG1dz/IPRYnqJY52HkyCd2fIiZhkJL7/mdSC9jAIeRtN+KtYTwvvPh0Qq+ JYr7KuEYpaUSu3TwpLQTea3bbawVDUm8VpDLJxC7gQ9XBDw81Guip0bZHrD6lT1Rf1lh E/WA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b19-20020a056402351300b0043bb69a32d6si7312080edd.561.2022.08.08.06.55.10; Mon, 08 Aug 2022 06:55:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242981AbiHHNwv (ORCPT + 99 others); Mon, 8 Aug 2022 09:52:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242251AbiHHNwu (ORCPT ); Mon, 8 Aug 2022 09:52:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D60BE18 for ; Mon, 8 Aug 2022 06:52:50 -0700 (PDT) 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 C4D0F60B37 for ; Mon, 8 Aug 2022 13:52:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DB80C433D6 for ; Mon, 8 Aug 2022 13:52:49 +0000 (UTC) Subject: [PATCH v3 3/7] NFSD: Trace NFSv4 COMPOUND tags From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Mon, 08 Aug 2022 09:52:48 -0400 Message-ID: <165996676808.2637.9770513652557583090.stgit@manet.1015granger.net> In-Reply-To: <165996657035.2637.4745479232455341597.stgit@manet.1015granger.net> References: <165996657035.2637.4745479232455341597.stgit@manet.1015granger.net> User-Agent: StGit/1.5.dev2+g9ce680a5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 The Linux NFSv4 client implementation does not use COMPOUND tags, but the Solaris and MacOS implementations do, and so does pynfs. Record these eye-catchers in the server's trace buffer to annotate client requests while troubleshooting. Signed-off-by: Chuck Lever --- fs/nfsd/nfs4proc.c | 2 +- fs/nfsd/trace.h | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 3895eb52d2b1..e622e1c5a8e1 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -2678,7 +2678,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp) rqstp->rq_lease_breaker = (void **)&cstate->clp; - trace_nfsd_compound(rqstp, args->opcnt); + trace_nfsd_compound(rqstp, args->tag, args->taglen, args->opcnt); while (!status && resp->opcnt < args->opcnt) { op = &args->ops[resp->opcnt++]; diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h index b6f3c1366a82..c5f3b5740bbf 100644 --- a/fs/nfsd/trace.h +++ b/fs/nfsd/trace.h @@ -84,19 +84,26 @@ DEFINE_NFSD_XDR_ERR_EVENT(cant_encode); { NFSD_MAY_64BIT_COOKIE, "64BIT_COOKIE" }) TRACE_EVENT(nfsd_compound, - TP_PROTO(const struct svc_rqst *rqst, - u32 args_opcnt), - TP_ARGS(rqst, args_opcnt), + TP_PROTO( + const struct svc_rqst *rqst, + const char *tag, + u32 taglen, + u32 opcnt + ), + TP_ARGS(rqst, tag, taglen, opcnt), TP_STRUCT__entry( __field(u32, xid) - __field(u32, args_opcnt) + __field(u32, opcnt) + __string_len(tag, tag, taglen) ), TP_fast_assign( __entry->xid = be32_to_cpu(rqst->rq_xid); - __entry->args_opcnt = args_opcnt; + __entry->opcnt = opcnt; + __assign_str_len(tag, tag, taglen); ), - TP_printk("xid=0x%08x opcnt=%u", - __entry->xid, __entry->args_opcnt) + TP_printk("xid=0x%08x opcnt=%u tag=%s", + __entry->xid, __entry->opcnt, __get_str(tag) + ) ) TRACE_EVENT(nfsd_compound_status,