From patchwork Wed Jan 11 18:54:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 9511051 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 37D2460710 for ; Wed, 11 Jan 2017 18:55:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C3ED2866E for ; Wed, 11 Jan 2017 18:55:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 211E928675; Wed, 11 Jan 2017 18:55:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FEB82866E for ; Wed, 11 Jan 2017 18:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754062AbdAKSz2 (ORCPT ); Wed, 11 Jan 2017 13:55:28 -0500 Received: from mx142.netapp.com ([216.240.21.19]:47054 "EHLO mx142.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754099AbdAKSz1 (ORCPT ); Wed, 11 Jan 2017 13:55:27 -0500 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="164232070" Received: from hioexcmbx02-prd.hq.netapp.com ([10.122.105.35]) by mx142-out.netapp.com with ESMTP; 11 Jan 2017 10:50:21 -0800 Received: from VMWEXCCAS05-PRD.hq.netapp.com (10.122.105.21) by hioexcmbx02-prd.hq.netapp.com (10.122.105.35) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 11 Jan 2017 10:55:13 -0800 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS05-PRD.hq.netapp.com (10.122.105.21) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Wed, 11 Jan 2017 10:55:12 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=xDBANY5cul7CfcqP+GN40D0iz4nC60jO3dTRuEgxUQM=; b=aLyYFCKU5SDkyFdlzOq2Xk68a0rrZjQKZQ13JvOh25EvpMGZhY0osEvDzvjAoZYg1uQKKxmUfk/iFHW2s/D+ckgz4kLbEs7P8brQFdE7zDdBB0k+VC9rKYIAv8PnTqLbkhWY0jHouR3i47jTMsdc+b+CR065/Amfpuy1UqHkhTc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anna.Schumaker@netapp.com; Received: from gouda.nowheycreamery.com.nowheycreamery.com (99.9.112.69) by CY1PR0601MB1642.namprd06.prod.outlook.com (10.163.232.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.829.7; Wed, 11 Jan 2017 18:55:11 +0000 From: To: Subject: [PATCH 11/11] NFS: Make trace_nfs4_setup_sequence() available to NFS v4.0 Date: Wed, 11 Jan 2017 13:54:54 -0500 Message-ID: <20170111185454.9315-12-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170111185454.9315-1-Anna.Schumaker@Netapp.com> References: <20170111185454.9315-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 X-Originating-IP: [99.9.112.69] X-ClientProxiedBy: CY1PR0201CA0001.namprd02.prod.outlook.com (10.163.30.139) To CY1PR0601MB1642.namprd06.prod.outlook.com (10.163.232.16) X-MS-Office365-Filtering-Correlation-Id: f0f1c75d-2c64-4e57-3094-08d43a535f31 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0601MB1642; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 3:ZBbNVi/hm8WVA+mBNpRLnV3EcFgGpVGwMW5lebr08ZF5XjdoMw5ArlwQ0O2t3buHOK2RIyMJw/opVRI0VguIxBaq+IK1Z7Nsz8pIMxRJHkl9RlSJO6EOEfj7wKceX70Xi1YtlNzKYl8F/m8iWM6aA0/vrKNUrfRL2J+chg7ssbH3neQd9gTYDwAAPGGx/JVXG+gasJCYhKGbMPfOt55+P5l8Q+6wvtlqdu+l/ZaRYAIn/hfkFeJxQktIekS8s0hr/cebR7s0C2Ot93EZ2IdF8A==; 25:3d96Q83Z4POb0a0j7avf/iRl95ZemnTAioHap+zJNvc0Nv2sZZIfObJ+7O8g2xTQmA0WcXgPM9WnA98VegxeJvef7pkggJ8xMHLOcr52wb5l3ELAU0d5luvWQiZZ/tndYf3zkQhJPdWzAhCxcROmD+q2ETufvqkGcDnEE7mQJHvJOvUjFUr6HMuh9tojhgwYWONp+6CC7AS75aRmlOG4s1iGO91BHkdPrfWtbLRn0K9kpTVdKaRj0gVOOWI2SDx7KGeFJXUdjiRYC+cH/7osmovn4rz5qjYPLDtUwmCx6c65QenZHQugWzid8jDTchbXVDlI3COrsuGJIUtZxfbu/btS41rM2p2ExxP3/VIcYxuR20d1+QP4zfBdFwqBMz+3EVIC+Lb8U8nKMMM5faYN0kpYGsuGdaP0LsCN7po3IkLAzBC4h7SnP/YWm86woMgYGpdCThAV1aQZPiG7zLq9mw== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 31:YR2ND5M+wg/c1v5AS7GbzGfeeTuJANcG4jD6az18USw+Q4wLoMOiYoYMVBQW7N3PGGaAZGd2UNBQ9cnGXrU5zB0yi9JTQkx6iPL9NuUPNQAd0yT/Mh7iASnAYL3IIkW4US9tPoqFKY0RhAJhNcCqFvglUMgUUi+4PvX+GtiWE/ZYl2ieBp8MsNpxL2BzKeUYb98IoZ9wjd0o0oRoNg5I5CwqFV3Js7K09fcXy18p4zovpRc+YIhBzhyu9XD3wXXesClAiHP7CGVIktME2pJk1A==; 20:v40XQBpk3fp0lpQ9BAvYK81TZtZP3yOcuv6sLkJGQR5AT1PFk3pu4EiaG83LXK0gErIlb1yfvHt+RLvhlqaZNkvis3aTMDSVulC6noyA4yT4v103ov+iRDgCHGkdiDRU1VgVTbpg+S3bIZsow5HDSVovkBTB9h6U6YUbquGBxKeRlneT5QhR8hLYFz3MyDdWl27GJJ4NXxcC08IxaBwAX4HBeoROa52d6QDdyYZzLVEhGc/3gAFJNeqJOjoPS1Un/ddDJgZBZtPnkwi8FFYNsbp/RHcuz8GsrLg0fjeueJP7W2IEefv4xm1/NBgb/LFTDCRs3t1eu4+VVOF4VVeyuiEBV6mY41B+1SfquKqDkpNNYp7z+gYtidJRpcQXVjXkV0ABNIyxYEAVBxG5F7LxeYzFtZaHvpHsjtNXPDwkT/AoFqYksOHlA6xmYraZIW0aba28olXymJ0ixNT+eMFP212Mt2zLY7EFpsbCrAcmOAZFjVo1dQTLg2smVOAI8aMc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:CY1PR0601MB1642; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0601MB1642; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 4:PZyI/axlo8HVyGnGp6D9dye1AC4rzQ1tPMn2RIkT4eDRwkcZj/b+Qs1zbobElWx0zTCAmg92TuzQf/vZ2QLPDGDzMtPdPTjCAgJthapkLrHNO4fczFhUAoNXHmJ1UZmUrBWcEyr1Gdw2wvMMd8HedBz5N1TLoQTaUdPeSIHhPanAeRkAI3cMCiLM0Jzm6uCnMfF60jzP7ZgYDAyji8fdF2lcJWjJ2+DyIGKPlws3wkYQodbn8pwqxtPZd4COpzyYK5n8quR6w1ztCy57o4nm6aqxwYOi7tN1DFkP+aKoe6GQKNt5h2eh7/3zzowrGlczv3j5XkAtFfOic22EsDCTvhwCG8ooN4WJ0/u3CLRUV8A2EF6jwRUXwrjrd/APTbxJ/IPeLd82O/u5vcBMLo3rN5G3N2OV1cPiuBY+stBSybZEas2tqZ45CcWnR+jnLro2YZKYdE52VsZZlqx6ut8ffhv5o/WRBCGwn/VlLqXQZXHbq8wXfpVsKtGcTbHhdXykuajNGMK3txQenKV8f1Ya6VAGjaBGa8i5AfpSL4gxIudnCXK6dJYcLXjLsKLv4kaMIfEkaRxi/2/SIca+jvBOcg== X-Forefront-PRVS: 01842C458A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(199003)(189002)(50986999)(2950100002)(6666003)(6916009)(101416001)(92566002)(38730400001)(7736002)(76176999)(25786008)(305945005)(86362001)(2351001)(5660300001)(110136003)(6506006)(42186005)(5003940100001)(106356001)(105586002)(86152003)(2906002)(2876002)(6486002)(575784001)(66066001)(1076002)(3846002)(6116002)(189998001)(47776003)(8676002)(107886002)(50466002)(48376002)(97736004)(36756003)(450100001)(81166006)(81156014)(6512007)(50226002)(68736007)(15760500002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0601MB1642; H:gouda.nowheycreamery.com.nowheycreamery.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: netapp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0601MB1642; 23:4r71TpvC8TKz5FMVHziH1cYW/UmytcDtKzspU29?= =?us-ascii?Q?w5B3PRje3DdU/uODg2goYL9znX2xg+qCbSwmFle0DE9pK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ticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0601MB1642; 7:aWZyQdWylvAtmeywFAm6yCL6+H+wmurS32pdrx7EVI46TiT5y6C7P3aYzi5+PHDdDzXgGVF+EoL6xnhovWXoR+ljPcnC7wmjOw/1hw5RReOixXK7BEvc98lgPp7W6I9pV720jBLXKrO3Rl9DrKVlU9hI67Nxh1Qy8Fg4SAO37vcs4iMLLsL1Lqb8DeVXO7drNQTuxoBi/UMkXTxjJPwvUFoCuard4rn5iBo47sDu4jvWY6vz/mBEM30J43YnV2HlwZNZd+6mDMeQnJW7joMp0QM/17vTHcMbXmtA9bREhPWF4vbVLDUDCfK12r8msgBuc1S43LBtJiNPQuYfy/34xbYH1lUieeP9ezAy099i1mPiOvxmSkdFGkPsME+d0CvglwIBKH8+xNNp5JsKP8taE+keZvZiIZotNEUWC9lb080hvoOXf3/wO4tQjIG9/qYK6AOBAYG+E/Coe6HPUwfwoA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2017 18:55:11.7656 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0601MB1642 X-OriginatorOrg: netapp.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Anna Schumaker This tracepoint displays information about the slot that was chosen for the RPC, in addition to session information. This could be useful information for debugging, and we can set the session id hash to 0 to indicate that there is no session. Signed-off-by: Anna Schumaker --- fs/nfs/nfs4proc.c | 4 +--- fs/nfs/nfs4session.h | 2 ++ fs/nfs/nfs4trace.h | 64 ++++++++++++++++++++++++++-------------------------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 31edcf07ac93..94fdf26f9bf4 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -925,11 +925,9 @@ int nfs4_setup_sequence(const struct nfs_client *client, res->sr_timestamp = jiffies; res->sr_status_flags = 0; res->sr_status = 1; -#ifdef CONFIG_NFS_V4_1 - trace_nfs4_setup_sequence(session, args); -#endif /* CONFIG_NFS_V4_1 */ } + trace_nfs4_setup_sequence(session, args); out_start: rpc_call_start(task); return 0; diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h index f6378d95b1b5..dfae4880eacb 100644 --- a/fs/nfs/nfs4session.h +++ b/fs/nfs/nfs4session.h @@ -175,6 +175,8 @@ static inline int nfs4_has_persistent_session(const struct nfs_client *clp) return 0; } +#define nfs_session_id_hash(session) (0) + #endif /* defined(CONFIG_NFS_V4_1) */ #endif /* IS_ENABLED(CONFIG_NFS_V4) */ #endif /* __LINUX_FS_NFS_NFS4SESSION_H */ diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index cfb8f7ce5cf6..845d0eadefc9 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -241,38 +241,6 @@ DEFINE_NFS4_CLIENTID_EVENT(nfs4_bind_conn_to_session); DEFINE_NFS4_CLIENTID_EVENT(nfs4_sequence); DEFINE_NFS4_CLIENTID_EVENT(nfs4_reclaim_complete); -TRACE_EVENT(nfs4_setup_sequence, - TP_PROTO( - const struct nfs4_session *session, - const struct nfs4_sequence_args *args - ), - TP_ARGS(session, args), - - TP_STRUCT__entry( - __field(unsigned int, session) - __field(unsigned int, slot_nr) - __field(unsigned int, seq_nr) - __field(unsigned int, highest_used_slotid) - ), - - TP_fast_assign( - const struct nfs4_slot *sa_slot = args->sa_slot; - __entry->session = nfs_session_id_hash(&session->sess_id); - __entry->slot_nr = sa_slot->slot_nr; - __entry->seq_nr = sa_slot->seq_nr; - __entry->highest_used_slotid = - sa_slot->table->highest_used_slotid; - ), - TP_printk( - "session=0x%08x slot_nr=%u seq_nr=%u " - "highest_used_slotid=%u", - __entry->session, - __entry->slot_nr, - __entry->seq_nr, - __entry->highest_used_slotid - ) -); - #define show_nfs4_sequence_status_flags(status) \ __print_flags((unsigned long)status, "|", \ { SEQ4_STATUS_CB_PATH_DOWN, "CB_PATH_DOWN" }, \ @@ -382,6 +350,38 @@ TRACE_EVENT(nfs4_cb_sequence, ); #endif /* CONFIG_NFS_V4_1 */ +TRACE_EVENT(nfs4_setup_sequence, + TP_PROTO( + const struct nfs4_session *session, + const struct nfs4_sequence_args *args + ), + TP_ARGS(session, args), + + TP_STRUCT__entry( + __field(unsigned int, session) + __field(unsigned int, slot_nr) + __field(unsigned int, seq_nr) + __field(unsigned int, highest_used_slotid) + ), + + TP_fast_assign( + const struct nfs4_slot *sa_slot = args->sa_slot; + __entry->session = session ? nfs_session_id_hash(&session->sess_id) : 0; + __entry->slot_nr = sa_slot->slot_nr; + __entry->seq_nr = sa_slot->seq_nr; + __entry->highest_used_slotid = + sa_slot->table->highest_used_slotid; + ), + TP_printk( + "session=0x%08x slot_nr=%u seq_nr=%u " + "highest_used_slotid=%u", + __entry->session, + __entry->slot_nr, + __entry->seq_nr, + __entry->highest_used_slotid + ) +); + DECLARE_EVENT_CLASS(nfs4_open_event, TP_PROTO( const struct nfs_open_context *ctx,