From patchwork Mon Oct 12 21:55:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olga Kornievskaia X-Patchwork-Id: 7379811 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6E229BEEA4 for ; Mon, 12 Oct 2015 21:55:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82BAF20386 for ; Mon, 12 Oct 2015 21:55:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D666A20767 for ; Mon, 12 Oct 2015 21:55:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752472AbbJLVzk (ORCPT ); Mon, 12 Oct 2015 17:55:40 -0400 Received: from mail-ig0-f169.google.com ([209.85.213.169]:37688 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752596AbbJLVzI (ORCPT ); Mon, 12 Oct 2015 17:55:08 -0400 Received: by igcpe7 with SMTP id pe7so1762026igc.0 for ; Mon, 12 Oct 2015 14:55:07 -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=NVX6Xf8fBo2QB+ZRa/29zlog0IxBDIXTmwDQLhiAi6c=; b=EThBATKnVPcfntCPXna6sR+r+M+H2oqQqDU3Wem4esteR3DfxueibyYicbIDiKnwnN EnEdGp7YR4tgBsGlI3TPGfju5O/I0SZTQSHqsmCUyC7owlnrIv0MeNLfxZuEiSshqJsy hhkdTlRoU18iS5w34yRIvF3t2DBXHhbQ0UTJf+7o/4AvIQb5lMxd3t6Nh9JxgB5wOh63 LZfrDIupDcpgdN+V9sg87wIJ29Dxeaz/fhckINPRadL1qOsJ61Nb1dMuzJ+jD031WMWN ueIFEOHLLgVEy3jLZOvYpXd31LQ7OaUxm5boK5vYAeRWO052vOuVCb6ebR/dPTAg9gIp gEqA== MIME-Version: 1.0 X-Received: by 10.50.2.39 with SMTP id 7mr13772402igr.86.1444686907190; Mon, 12 Oct 2015 14:55:07 -0700 (PDT) Received: by 10.107.27.144 with HTTP; Mon, 12 Oct 2015 14:55:07 -0700 (PDT) Date: Mon, 12 Oct 2015 17:55:07 -0400 X-Google-Sender-Auth: v30HFjPX18_3mIArwVtZzLnwHQQ 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: 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 ) );