All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Fields <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Hou Tao <houtao1@huawei.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH v2] nfsd: rename delegation related tracepoints to make them less confusing
Date: Sat, 29 Aug 2020 11:20:25 -0400	[thread overview]
Message-ID: <20200829152025.GA20499@fieldses.org> (raw)
In-Reply-To: <D32F1F35-2725-4809-9D10-2ED6EE2A2613@oracle.com>

On Fri, Aug 28, 2020 at 09:21:55AM -0400, Chuck Lever wrote:
> 
> 
> > On Aug 28, 2020, at 3:02 AM, Hou Tao <houtao1@huawei.com> wrote:
> > 
> > Now when a read delegation is given, two delegation related traces
> > will be printed:
> > 
> >    nfsd_deleg_open: client 5f45b854:e6058001 stateid 00000030:00000001
> >    nfsd_deleg_none: client 5f45b854:e6058001 stateid 0000002f:00000001
> > 
> > Although the intention is to let developers know two stateid are
> > returned, the traces are confusing about whether or not a read delegation
> > is handled out. So renaming trace_nfsd_deleg_none() to trace_nfsd_open()
> > and trace_nfsd_deleg_open() to trace_nfsd_deleg_read() to make
> > the intension clearer.
> > 
> > The patched traces will be:
> > 
> >    nfsd_deleg_read: client 5f48a967:b55b21cd stateid 00000003:00000001
> >    nfsd_open: client 5f48a967:b55b21cd stateid 00000002:00000001
> > 
> > Suggested-by: Chuck Lever <chuck.lever@oracle.com>
> > Signed-off-by: Hou Tao <houtao1@huawei.com>
> 
> LGTM. I assume Bruce is taking this for v5.10.

Applying for 5.10, thanks.--b.

> 
> 
> > ---
> > v1: https://marc.info/?l=linux-nfs&m=159851134513236&w=2
> > 
> > fs/nfsd/nfs4state.c | 4 ++--
> > fs/nfsd/trace.h     | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> > index c09a2a4281ec9..0525acfe31314 100644
> > --- a/fs/nfsd/nfs4state.c
> > +++ b/fs/nfsd/nfs4state.c
> > @@ -5126,7 +5126,7 @@ nfs4_open_delegation(struct svc_fh *fh, struct nfsd4_open *open,
> > 
> > 	memcpy(&open->op_delegate_stateid, &dp->dl_stid.sc_stateid, sizeof(dp->dl_stid.sc_stateid));
> > 
> > -	trace_nfsd_deleg_open(&dp->dl_stid.sc_stateid);
> > +	trace_nfsd_deleg_read(&dp->dl_stid.sc_stateid);
> > 	open->op_delegate_type = NFS4_OPEN_DELEGATE_READ;
> > 	nfs4_put_stid(&dp->dl_stid);
> > 	return;
> > @@ -5243,7 +5243,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
> > 	nfs4_open_delegation(current_fh, open, stp);
> > nodeleg:
> > 	status = nfs_ok;
> > -	trace_nfsd_deleg_none(&stp->st_stid.sc_stateid);
> > +	trace_nfsd_open(&stp->st_stid.sc_stateid);
> > out:
> > 	/* 4.1 client trying to upgrade/downgrade delegation? */
> > 	if (open->op_delegate_type == NFS4_OPEN_DELEGATE_NONE && dp &&
> > diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
> > index 1861db1bdc670..99bf07800cd09 100644
> > --- a/fs/nfsd/trace.h
> > +++ b/fs/nfsd/trace.h
> > @@ -289,8 +289,8 @@ DEFINE_STATEID_EVENT(layout_recall_done);
> > DEFINE_STATEID_EVENT(layout_recall_fail);
> > DEFINE_STATEID_EVENT(layout_recall_release);
> > 
> > -DEFINE_STATEID_EVENT(deleg_open);
> > -DEFINE_STATEID_EVENT(deleg_none);
> > +DEFINE_STATEID_EVENT(open);
> > +DEFINE_STATEID_EVENT(deleg_read);
> > DEFINE_STATEID_EVENT(deleg_break);
> > DEFINE_STATEID_EVENT(deleg_recall);
> > 
> > -- 
> > 2.25.0.4.g0ad7144999
> > 
> 
> --
> Chuck Lever
> 
> 

      reply	other threads:[~2020-08-29 15:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27  7:02 [PATCH] nfsd: don't call trace_nfsd_deleg_none() if read delegation is given Hou Tao
2020-08-27 14:43 ` Chuck Lever
2020-08-28  2:23   ` Hou Tao
2020-08-28  7:02   ` [PATCH v2] nfsd: rename delegation related tracepoints to make them less confusing Hou Tao
2020-08-28 13:21     ` Chuck Lever
2020-08-29 15:20       ` Bruce Fields [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200829152025.GA20499@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=houtao1@huawei.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.