Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1201847rwn; Thu, 8 Sep 2022 15:22:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR6l30R9i1O6NFkUKdOeRVW2LcKIMFl6kBeNKTU2lolcba7QZbJXyJd2dSgC6S4bU3/q37lI X-Received: by 2002:a63:d312:0:b0:438:5cd8:8d56 with SMTP id b18-20020a63d312000000b004385cd88d56mr3464006pgg.615.1662675771584; Thu, 08 Sep 2022 15:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662675771; cv=none; d=google.com; s=arc-20160816; b=FsH8eJejlNvBuBt4abgLG12HN5uhKKAQisUBb4k1qy/7/rD0Yl8TK2H1EcgNDqEoZE X8oRtfsoR4aZ5ItGkwJiVyYbzV654MpFR8+ziMMiZIQOlDTMMiwOLBO8TKYLNMemfB1+ ycVk5j//qdktXH39Chl2Rr66T2qNZpugNc1RRlOSs/sKF6aT+bXt+TSrHuNMOqaEU3LL xUtiMId21KYAtFVAqeWWrucKf3Q1GV0GSiJaQnWJYtLwBVk95YcsySYOyYEDtcbxXVu6 qV35LkH+3OFNSwOjJGMf+y66SALw5gLhWWMQVvGy4KZpKfy1/G0ZbjtwRLczxTH8BUSK S28Q== 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=kmAdAcm5NciWtbdQ9ECS/ZU0CjlzG0zZObdLlLO+jYY=; b=xRAGPkWHQU3qBxLJTxq0FmsJrwpnNYCWn6ller+PUMog1qRSJ9kl09/wR3z0QmPiU0 eDhYe3qLfXXWi4zVzDHNeTpmrw6gyWzb1UqCX08vrm1SxJ3gx6e9JrcYBoWeB7koJttT PyIgKWBeLCr3H3h6JDzh4yLL53R7fpXOr4zMGaaZX7xC/ruShXVmZtu+uYz0VMUjF+JY 44T9FSFsUSWDfTmzmMHetsXbkEztcomy7N2Bl+eJ+KfPtLEgbgLOjQ2TwkBlLgMWW2N3 EG9AZhr9RfcW4Cqy/DdRCR301wjlFLG439gwfVEJ2Zei1bc7Z3Wwv9D1c8Er673+B7v+ xhMg== 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 eb22-20020a056a004c9600b005384ae9f7cesi159764pfb.92.2022.09.08.15.22.38; Thu, 08 Sep 2022 15:22:51 -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 S229633AbiIHWNw (ORCPT + 99 others); Thu, 8 Sep 2022 18:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229832AbiIHWNv (ORCPT ); Thu, 8 Sep 2022 18:13:51 -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 768DB1098EF for ; Thu, 8 Sep 2022 15:13: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 1595961D99 for ; Thu, 8 Sep 2022 22:13:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D509C433D6 for ; Thu, 8 Sep 2022 22:13:49 +0000 (UTC) Subject: [PATCH v4 2/8] NFSD: Trace NFSv4 COMPOUND tags From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Thu, 08 Sep 2022 18:13:48 -0400 Message-ID: <166267522847.1842.6962635386840299926.stgit@manet.1015granger.net> In-Reply-To: <166267495153.1842.14474564029477470642.stgit@manet.1015granger.net> References: <166267495153.1842.14474564029477470642.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 a72ab97f77ef..d43beb732987 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -2648,7 +2648,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 1b9f5753f336..0c35a1a844e6 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,