[pnfs] [PATCH] Add debug information

Marc Eshel eshel at almaden.ibm.com
Thu Sep 6 13:22:27 EDT 2007


From: Marc Eshel <eshel at almaden.ibm.com>


---

 fs/nfs/callback_proc.c |   12 +++++++++---
 fs/nfs/nfs4xdr.c       |    3 ++-
 fs/nfsd/nfs4proc.c     |    3 ++-
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 4929784..920a00f 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -121,13 +121,19 @@ unsigned nfs4_callback_pnfs_layoutrecall
 
 	res = htonl(NFS4ERR_BADHANDLE);
 	clp = nfs4_find_client(args->cbl_addr);
-	if (clp == NULL)
+	if (clp == NULL) {
+		dprintk("%s: no client for addr %u.%u.%u.%u\n",
+			__FUNCTION__, NIPQUAD(args->cbl_addr));
+		
 		goto out;
-
+	}
 	if (args->cbl_recall_type == RECALL_FILE) {
 		inode = nfs_layout_find_inode(clp, &args->cbl_fh);
-		if (inode == NULL)
+		if (inode == NULL) {
+			dprintk("%s: no inode for RECALL_FILE\n", __FUNCTION__);
+
 			goto out_putclient;
+		}
 	}
 
 	/* Set up a helper thread to actually return the delegation */
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 4e5a7d9..2aee4da 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -668,7 +668,8 @@ static int encode_compound_hdr(struct xd
 {
 	uint32_t *p;
 
-	dprintk("encode_compound: tag=%.*s\n", (int)hdr->taglen, hdr->tag);
+	dprintk("encode_compound: nops %d ver %d tag=%.*s\n",
+		hdr->nops, minorversion, (int)hdr->taglen, hdr->tag);
 	BUG_ON(hdr->taglen > NFS4_MAXTAGLEN);
 	RESERVE_SPACE(12+(XDR_QUADLEN(hdr->taglen)<<2));
 	WRITE32(hdr->taglen);
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 68133c4..3983635 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -1159,7 +1159,8 @@ #endif
 	while (!status && resp->opcnt < args->opcnt) {
 		op = &args->ops[resp->opcnt++];
 
-		dprintk("nfsv4 compound op %p #%d: %d\n", args->ops, resp->opcnt, op->opnum);
+		dprintk("nfsv4 compound op %p opcnt %d #%d: %d\n",
+			args->ops, args->opcnt, resp->opcnt, op->opnum);
 
 		/*
 		 * The XDR decode routines may have pre-set op->status;


More information about the pNFS mailing list