From patchwork Mon Oct 12 22:01:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olga Kornievskaia X-Patchwork-Id: 7379831 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ED1BF9F302 for ; Mon, 12 Oct 2015 22:01:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00C8A208FA for ; Mon, 12 Oct 2015 22:01:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D93C208F8 for ; Mon, 12 Oct 2015 22:01:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbbJLWBX (ORCPT ); Mon, 12 Oct 2015 18:01:23 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:33532 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752660AbbJLWBN (ORCPT ); Mon, 12 Oct 2015 18:01:13 -0400 Received: by iodv82 with SMTP id v82so2418935iod.0 for ; Mon, 12 Oct 2015 15:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=vaFVIA/kWueX3hjyrml7mh1fyp7OEM8LmXbgSu1neIU=; b=tNJGCgJC2ExZgNHiiUyWOjb5MsVL4NUY0MP3MbKXMSTgtRageTtEFJaJ3c4M1p5ett Ir48/Fpzp08LO/BRPri0/b6f9172SZjsVo40IYvS5TqquSW3pAezTM4YPmw6CNRZeg2X SBzXEsmskC2/cEU4zqbtGOJYqMNahyqREF2BiJ/VNsoI+6hyGQPDd7BoXin0Bib/sUv4 s2Buqn41GVK5t0WKRuTPmFPwc/1s73sDlnyoNqjIAINQs1VngxXaXwFznJ5jLllNh3+F 28/ZBFlVHXmne/SgbBatpiDmuLlkv6siF9pHjSUXQMNwDQPg6OsXTew/DdJCHuE5s1Hy KdkA== MIME-Version: 1.0 X-Received: by 10.107.148.78 with SMTP id w75mr11922555iod.26.1444687272709; Mon, 12 Oct 2015 15:01:12 -0700 (PDT) Received: by 10.107.27.144 with HTTP; Mon, 12 Oct 2015 15:01:12 -0700 (PDT) Date: Mon, 12 Oct 2015 18:01:12 -0400 X-Google-Sender-Auth: 8ki_npFenJh8ogKv1_0mOcUJeHo Message-ID: Subject: [PATCH 1/1] Adding issync field to delegreturn_exit tracepoint From: Olga Kornievskaia To: linux-nfs Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It'll be nice to know when we return delegations synchronously or not. Signed-off-by: Olga Kornievskaia --- fs/nfs/nfs4proc.c | 5 ++++- fs/nfs/nfs4trace.h | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index f93b9cd..858c780 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5283,6 +5283,7 @@ struct nfs4_delegreturndata { struct inode *inode; bool roc; u32 roc_barrier; + int issync; }; static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata) @@ -5292,7 +5293,8 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata) if (!nfs4_sequence_done(task, &data->res.seq_res)) return; - trace_nfs4_delegreturn_exit(&data->args, &data->res, task->tk_status); + trace_nfs4_delegreturn_exit(&data->args, &data->res, task->tk_status, + data->issync); switch (task->tk_status) { case 0: renew_lease(data->res.server, data->timestamp); @@ -5387,6 +5389,7 @@ static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, co data->inode = nfs_igrab_and_active(inode); if (data->inode) data->roc = nfs4_roc(inode); + data->issync = issync; task_setup_data.callback_data = data; msg.rpc_argp = &data->args; diff --git a/fs/nfs/nfs4trace.h b/fs/nfs/nfs4trace.h index 671cf68..be67e87 100644 --- a/fs/nfs/nfs4trace.h +++ b/fs/nfs/nfs4trace.h @@ -612,29 +612,33 @@ TRACE_EVENT(nfs4_delegreturn_exit, TP_PROTO( const struct nfs4_delegreturnargs *args, const struct nfs4_delegreturnres *res, - int error + int error, + int issync ), - TP_ARGS(args, res, error), + TP_ARGS(args, res, error, issync), TP_STRUCT__entry( __field(dev_t, dev) __field(u32, fhandle) __field(int, error) + __field(int, issync) ), TP_fast_assign( __entry->dev = res->server->s_dev; __entry->fhandle = nfs_fhandle_hash(args->fhandle); __entry->error = error; + __entry->issync = issync; ), TP_printk( - "error=%d (%s) dev=%02x:%02x fhandle=0x%08x", + "error=%d (%s) dev=%02x:%02x fhandle=0x%08x issync=%d", __entry->error, show_nfsv4_errors(__entry->error), MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->fhandle + __entry->fhandle, + __entry->issync ) );