Re: [PATCH] NFSD: trace export root filehandle event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----邮件原件-----
> 发件人: Chuck Lever <chuck.lever@xxxxxxxxxx>
> 发送时间: 2024年3月28日 0:06
> 收件人: Chen, Hanxia <chenhx.fnst@xxxxxxxxxxx>
> 抄送: Jeff Layton <jlayton@xxxxxxxxxx>; Neil Brown <neilb@xxxxxxx>; Olga
> Kornievskaia <kolga@xxxxxxxxxx>; Dai Ngo <Dai.Ngo@xxxxxxxxxx>; Tom
> Talpey <tom@xxxxxxxxxx>; linux-nfs@xxxxxxxxxxxxxxx
> 主题: Re: [PATCH] NFSD: trace export root filehandle event
> 
> On Wed, Mar 27, 2024 at 11:27:37PM +0800, Chen Hanxiao wrote:
> > Add a tracepoint for obtaining root filehandle event
> >
> > Signed-off-by: Chen Hanxiao <chenhx.fnst@xxxxxxxxxxx>
> > ---
> >  fs/nfsd/export.c |  4 +---
> >  fs/nfsd/trace.h  | 39 +++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 40 insertions(+), 3 deletions(-)
> >
> > diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
> > index 7b641095a665..690721ba42f3 100644
> > --- a/fs/nfsd/export.c
> > +++ b/fs/nfsd/export.c
> > @@ -1027,15 +1027,13 @@ exp_rootfh(struct net *net, struct auth_domain
> *clp, char *name,
> >  	}
> >  	inode = d_inode(path.dentry);
> >
> > -	dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%ld)\n",
> > -		 name, path.dentry, clp->name,
> > -		 inode->i_sb->s_id, inode->i_ino);
> >  	exp = exp_parent(cd, clp, &path);
> >  	if (IS_ERR(exp)) {
> >  		err = PTR_ERR(exp);
> >  		goto out;
> >  	}
> >
> > +	trace_nfsd_exp_rootfh(name, path.dentry, clp->name, inode, exp);
> 
> Converting the above dprintk to a tracepoint seems sensible.
> 
> I'd like to hear comments from others about whether the new
> tracepoint records a useful set of information. We don't need to
> record the memory address of the dentry, for example. Recording the
> net namespace might be useful, though.
> 

Maybe we cloud record ex_flags too.

Regards,
- Chen




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux