diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2012-03-01 17:01:31 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-02 17:18:08 -0500 |
commit | 20d27e929fb4790a339a4ddcc9a27f14db06055b (patch) | |
tree | e62d752180c2c7342d801f903c7f2ce2dd952075 /include/linux/nfs_fs.h | |
parent | 31b8e2aec099f22d40277c424d8c24b2a4c95fce (diff) | |
download | linux-20d27e929fb4790a339a4ddcc9a27f14db06055b.tar.gz linux-20d27e929fb4790a339a4ddcc9a27f14db06055b.tar.bz2 linux-20d27e929fb4790a339a4ddcc9a27f14db06055b.zip |
NFS: Add a client-side function to display NFS file handles
For debugging, introduce a simplistic function to print NFS file
handles on the system console. The main function is hooked into the
dprintk debugging facility, but you can directly call the helper,
_nfs_display_fhandle(), if you want to print a handle unconditionally.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r-- | include/linux/nfs_fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 8c29950d2fa5..c07a757649dc 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -395,6 +395,20 @@ static inline void nfs_free_fhandle(const struct nfs_fh *fh) kfree(fh); } +#ifdef RPC_DEBUG +extern void _nfs_display_fhandle(const struct nfs_fh *fh, const char *caption); +#define nfs_display_fhandle(fh, caption) \ + do { \ + if (unlikely(nfs_debug & NFSDBG_FACILITY)) \ + _nfs_display_fhandle(fh, caption); \ + } while (0) +#else +static inline void nfs_display_fhandle(const struct nfs_fh *fh, + const char *caption) +{ +} +#endif + /* * linux/fs/nfs/nfsroot.c */ |