NFS: Move dprintks from callback.c to callback_proc.c
authorChuck Lever <chuck.lever@oracle.com>
Mon, 10 Dec 2007 19:57:23 +0000 (14:57 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:05:52 +0000 (02:05 -0500)
Clean up: The client side peer address is available in callback_proc.c,
so move a dprintk out of fs/nfs/callback.c and into
fs/nfs/callback_proc.c.

This is more consistent with other debugging messages, and the proc
routines have more information about each request to display.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/callback.c
fs/nfs/callback_proc.c

index a796be5051bfa4886254f7bd40a9cb4f7ff4f7de..bbf67f148ff90abb60ee135e157f25492dfdd52f 100644 (file)
@@ -73,8 +73,6 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
        complete(&nfs_callback_info.started);
 
        for(;;) {
-               char buf[RPC_MAX_ADDRBUFLEN];
-
                if (signalled()) {
                        if (nfs_callback_info.users == 0)
                                break;
@@ -92,8 +90,6 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
                                        __FUNCTION__, -err);
                        break;
                }
-               dprintk("%s: request from %s\n", __FUNCTION__,
-                               svc_print_addr(rqstp, buf, sizeof(buf)));
                svc_process(rqstp);
        }
 
index 72e55d83756d9b6d6b5e82a28040b58b0375cf9c..e89a9007c91cfcb11eff70a777dce52769e73947 100644 (file)
@@ -12,7 +12,9 @@
 #include "delegation.h"
 #include "internal.h"
 
+#ifdef NFS_DEBUG
 #define NFSDBG_FACILITY NFSDBG_CALLBACK
+#endif
  
 __be32 nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *res)
 {
@@ -20,12 +22,16 @@ __be32 nfs4_callback_getattr(struct cb_getattrargs *args, struct cb_getattrres *
        struct nfs_delegation *delegation;
        struct nfs_inode *nfsi;
        struct inode *inode;
-       
+
        res->bitmap[0] = res->bitmap[1] = 0;
        res->status = htonl(NFS4ERR_BADHANDLE);
        clp = nfs_find_client(args->addr, 4);
        if (clp == NULL)
                goto out;
+
+       dprintk("NFS: GETATTR callback request from %s\n",
+               rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR));
+
        inode = nfs_delegation_find_inode(clp, &args->fh);
        if (inode == NULL)
                goto out_putclient;
@@ -65,6 +71,10 @@ __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy)
        clp = nfs_find_client(args->addr, 4);
        if (clp == NULL)
                goto out;
+
+       dprintk("NFS: RECALL callback request from %s\n",
+               rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR));
+
        inode = nfs_delegation_find_inode(clp, &args->fh);
        if (inode == NULL)
                goto out_putclient;