From: Chuck Lever <chuck.lever@oracle.com>
To: akpm@linux-foundation.org
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 06/13] NFS: Improve debugging output in NFS in-kernel mount client
Date: Mon, 21 May 2007 12:09:44 -0400 [thread overview]
Message-ID: <20070521160944.18993.975.stgit@manray.1015granger.net> (raw)
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfs/mount_clnt.c | 18 +++++++++++++-----
include/linux/nfs_fs.h | 1 +
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index f8584ad..81ea782 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -16,7 +16,7 @@
#include <linux/nfs_fs.h>
#ifdef RPC_DEBUG
-# define NFSDBG_FACILITY NFSDBG_ROOT
+# define NFSDBG_FACILITY NFSDBG_MOUNT
#endif
static struct rpc_program mnt_program;
@@ -72,8 +72,8 @@ int nfs_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh,
char hostname[32];
int status;
- dprintk("NFS: nfs_mount(%08x:%s)\n",
- (unsigned)ntohl(addr->sin_addr.s_addr), path);
+ dprintk("NFS: %s: mounting" NIPQUAD_FMT ":%s\n",
+ __FUNCTION__, NIPQUAD(addr->sin_addr.s_addr), path);
sprintf(hostname, NIPQUAD_FMT, NIPQUAD(addr->sin_addr.s_addr));
mnt_clnt = mnt_create(hostname, addr, version, protocol);
@@ -86,10 +86,18 @@ int nfs_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh,
msg.rpc_proc = &mnt_clnt->cl_procinfo[MNTPROC_MNT];
status = rpc_call_sync(mnt_clnt, &msg, 0);
- if (status < 0)
+ if (status < 0) {
+ dprintk("NFS: %s: rpc_call_sync returned %d\n",
+ __FUNCTION__, status);
return status;
- if (result.status != 0)
+ }
+ if (result.status != 0) {
+ dprintk("NFS: %s: server returned %d\n",
+ __FUNCTION__, result.status);
return -EACCES;
+ }
+ dprintk("NFS: %s: mount request succeeded\n",
+ __FUNCTION__);
return 0;
}
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 58f5b77..2f33ef7 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -555,6 +555,7 @@ extern void * nfs_root_data(void);
#define NFSDBG_ROOT 0x0080
#define NFSDBG_CALLBACK 0x0100
#define NFSDBG_CLIENT 0x0200
+#define NFSDBG_MOUNT 0x0400
#define NFSDBG_ALL 0xFFFF
#ifdef __KERNEL__
reply other threads:[~2007-05-21 16:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070521160944.18993.975.stgit@manray.1015granger.net \
--to=chuck.lever@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).