linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 06/13] NFS: Improve debugging output in NFS in-kernel mount client
@ 2007-05-21 16:09 Chuck Lever
  0 siblings, 0 replies; only message in thread
From: Chuck Lever @ 2007-05-21 16:09 UTC (permalink / raw)
  To: akpm; +Cc: linux-fsdevel

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__


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-21 16:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 16:09 [PATCH 06/13] NFS: Improve debugging output in NFS in-kernel mount client Chuck Lever

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).