Linux NFS development
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 3/7] NFS: Make nfs_open methods consistent
Date: Tue, 10 Jun 2008 14:27:39 -0400	[thread overview]
Message-ID: <1213122459.20459.4.camel@localhost> (raw)
In-Reply-To: <20080527202922.6651.18161.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>

On Tue, 2008-05-27 at 16:29 -0400, Chuck Lever wrote:
> Clean up: Report the same debugging info and count function calls the
> same for files and directories in nfs_opendir() and nfs_file_open().
>=20
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>=20
>  fs/nfs/dir.c  |    8 ++++++--
>  fs/nfs/file.c |    5 +++++
>  2 files changed, 11 insertions(+), 2 deletions(-)
>=20
>=20
> diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
> index 36e51f7..40b559a 100644
> --- a/fs/nfs/dir.c
> +++ b/fs/nfs/dir.c
> @@ -131,10 +131,14 @@ const struct inode_operations nfs4_dir_inode_op=
erations =3D {
>  static int
>  nfs_opendir(struct inode *inode, struct file *filp)
>  {
> +	struct dentry *dentry =3D filp->f_path.dentry;
>  	int res;
> =20
> -	dfprintk(VFS, "NFS: opendir(%s/%ld)\n",
> -			inode->i_sb->s_id, inode->i_ino);
> +	dfprintk(VFS, "NFS: open dir(%s/%s)\n",
> +			dentry->d_parent->d_name.name,
> +			dentry->d_name.name);
> +
> +	nfs_inc_stats(inode, NFSIOS_VFSOPEN);
> =20

This will result in 'unused variable' warnings for 'dentry' if you
compile with #undef RPC_DEBUG.

>  	lock_kernel();
>  	/* Call generic open code in order to cache credentials */
> diff --git a/fs/nfs/file.c b/fs/nfs/file.c
> index 06a1322..c3e7af0 100644
> --- a/fs/nfs/file.c
> +++ b/fs/nfs/file.c
> @@ -117,8 +117,13 @@ static int nfs_check_flags(int flags)
>  static int
>  nfs_file_open(struct inode *inode, struct file *filp)
>  {
> +	struct dentry *dentry =3D filp->f_path.dentry;
>  	int res;
> =20
> +	dfprintk(VFS, "NFS: open file(%s/%s)\n",
> +			dentry->d_parent->d_name.name,
> +			dentry->d_name.name);
> +

=EF=BB=BFThis will result in 'unused variable' warnings for 'dentry' if=
 you
compile with #undef RPC_DEBUG.

>  	res =3D nfs_check_flags(filp->f_flags);
>  	if (res)
>  		return res;
>=20
--=20
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

  parent reply	other threads:[~2008-06-10 18:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-27 20:28 [PATCH 0/7] Second series of patches for 2.6.27 Chuck Lever
     [not found] ` <20080527202347.6651.54668.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2008-05-27 20:29   ` [PATCH 1/7] NFS: Make nfs_fsync methods consistent Chuck Lever
2008-05-27 20:29   ` [PATCH 2/7] NFS: Make nfs_llseek " Chuck Lever
     [not found]     ` <20080527202915.6651.44947.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2008-06-10 18:27       ` Trond Myklebust
2008-05-27 20:29   ` [PATCH 3/7] NFS: Make nfs_open " Chuck Lever
     [not found]     ` <20080527202922.6651.18161.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2008-06-10 18:27       ` Trond Myklebust [this message]
2008-05-27 20:29   ` [PATCH 4/7] NFS: Add debugging facility for NFS aops Chuck Lever
     [not found]     ` <20080527202929.6651.32893.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2008-06-10 18:30       ` Trond Myklebust
2008-05-27 20:29   ` [PATCH 5/7] NFS: Use NFSDBG_FILE for all fops Chuck Lever
     [not found]     ` <20080527202937.6651.55382.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2008-06-10 18:32       ` Trond Myklebust
2008-05-27 20:29   ` [PATCH 6/7] NFS: Fix trace debugging nits in write.c Chuck Lever
2008-05-27 20:29   ` [PATCH 7/7] SUNRPC: Remove obsolete messages during transport connect Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2008-06-11 21:55 [PATCH 0/7] dprintk clean-ups [resend] Chuck Lever
     [not found] ` <20080611215018.7068.71737.stgit-ewv44WTpT0t9HhUboXbp9zCvJB+x5qRC@public.gmane.org>
2008-06-11 21:55   ` [PATCH 3/7] NFS: Make nfs_open methods consistent Chuck Lever

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=1213122459.20459.4.camel@localhost \
    --to=trond.myklebust@netapp.com \
    --cc=chuck.lever@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox