Commit 46121cf7 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

SUNRPC: fix print format for tk_pid

The tk_pid field is an unsigned short.  The proper print format specifier for
that type is %5u, not %4d.

Also clean up some miscellaneous print formatting nits.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 8885cb36
...@@ -287,7 +287,7 @@ rpcauth_bindcred(struct rpc_task *task) ...@@ -287,7 +287,7 @@ rpcauth_bindcred(struct rpc_task *task)
struct rpc_cred *ret; struct rpc_cred *ret;
int flags = 0; int flags = 0;
dprintk("RPC: %4d looking up %s cred\n", dprintk("RPC: %5u looking up %s cred\n",
task->tk_pid, task->tk_auth->au_ops->au_name); task->tk_pid, task->tk_auth->au_ops->au_name);
get_group_info(acred.group_info); get_group_info(acred.group_info);
if (task->tk_flags & RPC_TASK_ROOTCREDS) if (task->tk_flags & RPC_TASK_ROOTCREDS)
...@@ -304,8 +304,9 @@ rpcauth_bindcred(struct rpc_task *task) ...@@ -304,8 +304,9 @@ rpcauth_bindcred(struct rpc_task *task)
void void
rpcauth_holdcred(struct rpc_task *task) rpcauth_holdcred(struct rpc_task *task)
{ {
dprintk("RPC: %4d holding %s cred %p\n", dprintk("RPC: %5u holding %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred); task->tk_pid, task->tk_auth->au_ops->au_name,
task->tk_msg.rpc_cred);
if (task->tk_msg.rpc_cred) if (task->tk_msg.rpc_cred)
get_rpccred(task->tk_msg.rpc_cred); get_rpccred(task->tk_msg.rpc_cred);
} }
...@@ -324,7 +325,7 @@ rpcauth_unbindcred(struct rpc_task *task) ...@@ -324,7 +325,7 @@ rpcauth_unbindcred(struct rpc_task *task)
{ {
struct rpc_cred *cred = task->tk_msg.rpc_cred; struct rpc_cred *cred = task->tk_msg.rpc_cred;
dprintk("RPC: %4d releasing %s cred %p\n", dprintk("RPC: %5u releasing %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, cred); task->tk_pid, task->tk_auth->au_ops->au_name, cred);
put_rpccred(cred); put_rpccred(cred);
...@@ -336,7 +337,7 @@ rpcauth_marshcred(struct rpc_task *task, __be32 *p) ...@@ -336,7 +337,7 @@ rpcauth_marshcred(struct rpc_task *task, __be32 *p)
{ {
struct rpc_cred *cred = task->tk_msg.rpc_cred; struct rpc_cred *cred = task->tk_msg.rpc_cred;
dprintk("RPC: %4d marshaling %s cred %p\n", dprintk("RPC: %5u marshaling %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, cred); task->tk_pid, task->tk_auth->au_ops->au_name, cred);
return cred->cr_ops->crmarshal(task, p); return cred->cr_ops->crmarshal(task, p);
...@@ -347,7 +348,7 @@ rpcauth_checkverf(struct rpc_task *task, __be32 *p) ...@@ -347,7 +348,7 @@ rpcauth_checkverf(struct rpc_task *task, __be32 *p)
{ {
struct rpc_cred *cred = task->tk_msg.rpc_cred; struct rpc_cred *cred = task->tk_msg.rpc_cred;
dprintk("RPC: %4d validating %s cred %p\n", dprintk("RPC: %5u validating %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, cred); task->tk_pid, task->tk_auth->au_ops->au_name, cred);
return cred->cr_ops->crvalidate(task, p); return cred->cr_ops->crvalidate(task, p);
...@@ -359,7 +360,7 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp, ...@@ -359,7 +360,7 @@ rpcauth_wrap_req(struct rpc_task *task, kxdrproc_t encode, void *rqstp,
{ {
struct rpc_cred *cred = task->tk_msg.rpc_cred; struct rpc_cred *cred = task->tk_msg.rpc_cred;
dprintk("RPC: %4d using %s cred %p to wrap rpc data\n", dprintk("RPC: %5u using %s cred %p to wrap rpc data\n",
task->tk_pid, cred->cr_ops->cr_name, cred); task->tk_pid, cred->cr_ops->cr_name, cred);
if (cred->cr_ops->crwrap_req) if (cred->cr_ops->crwrap_req)
return cred->cr_ops->crwrap_req(task, encode, rqstp, data, obj); return cred->cr_ops->crwrap_req(task, encode, rqstp, data, obj);
...@@ -373,7 +374,7 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp, ...@@ -373,7 +374,7 @@ rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
{ {
struct rpc_cred *cred = task->tk_msg.rpc_cred; struct rpc_cred *cred = task->tk_msg.rpc_cred;
dprintk("RPC: %4d using %s cred %p to unwrap rpc data\n", dprintk("RPC: %5u using %s cred %p to unwrap rpc data\n",
task->tk_pid, cred->cr_ops->cr_name, cred); task->tk_pid, cred->cr_ops->cr_name, cred);
if (cred->cr_ops->crunwrap_resp) if (cred->cr_ops->crunwrap_resp)
return cred->cr_ops->crunwrap_resp(task, decode, rqstp, return cred->cr_ops->crunwrap_resp(task, decode, rqstp,
...@@ -388,7 +389,7 @@ rpcauth_refreshcred(struct rpc_task *task) ...@@ -388,7 +389,7 @@ rpcauth_refreshcred(struct rpc_task *task)
struct rpc_cred *cred = task->tk_msg.rpc_cred; struct rpc_cred *cred = task->tk_msg.rpc_cred;
int err; int err;
dprintk("RPC: %4d refreshing %s cred %p\n", dprintk("RPC: %5u refreshing %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, cred); task->tk_pid, task->tk_auth->au_ops->au_name, cred);
err = cred->cr_ops->crrefresh(task); err = cred->cr_ops->crrefresh(task);
...@@ -400,7 +401,7 @@ rpcauth_refreshcred(struct rpc_task *task) ...@@ -400,7 +401,7 @@ rpcauth_refreshcred(struct rpc_task *task)
void void
rpcauth_invalcred(struct rpc_task *task) rpcauth_invalcred(struct rpc_task *task)
{ {
dprintk("RPC: %4d invalidating %s cred %p\n", dprintk("RPC: %5u invalidating %s cred %p\n",
task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred); task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred);
spin_lock(&rpc_credcache_lock); spin_lock(&rpc_credcache_lock);
if (task->tk_msg.rpc_cred) if (task->tk_msg.rpc_cred)
......
...@@ -39,7 +39,8 @@ static struct rpc_credops unix_credops; ...@@ -39,7 +39,8 @@ static struct rpc_credops unix_credops;
static struct rpc_auth * static struct rpc_auth *
unx_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor) unx_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
{ {
dprintk("RPC: creating UNIX authenticator for client %p\n", clnt); dprintk("RPC: creating UNIX authenticator for client %p\n",
clnt);
if (atomic_inc_return(&unix_auth.au_count) == 0) if (atomic_inc_return(&unix_auth.au_count) == 0)
unix_cred_cache.nextgc = jiffies + (unix_cred_cache.expire >> 1); unix_cred_cache.nextgc = jiffies + (unix_cred_cache.expire >> 1);
return &unix_auth; return &unix_auth;
......
...@@ -215,7 +215,8 @@ int cache_check(struct cache_detail *detail, ...@@ -215,7 +215,8 @@ int cache_check(struct cache_detail *detail,
if (rv == -EAGAIN) if (rv == -EAGAIN)
rv = -ENOENT; rv = -ENOENT;
} else if (rv == -EAGAIN || age > refresh_age/2) { } else if (rv == -EAGAIN || age > refresh_age/2) {
dprintk("Want update, refage=%ld, age=%ld\n", refresh_age, age); dprintk("RPC: Want update, refage=%ld, age=%ld\n",
refresh_age, age);
if (!test_and_set_bit(CACHE_PENDING, &h->flags)) { if (!test_and_set_bit(CACHE_PENDING, &h->flags)) {
switch (cache_make_upcall(detail, h)) { switch (cache_make_upcall(detail, h)) {
case -EINVAL: case -EINVAL:
......
This diff is collapsed.
...@@ -97,7 +97,7 @@ void rpc_getport(struct rpc_task *task) ...@@ -97,7 +97,7 @@ void rpc_getport(struct rpc_task *task)
struct rpc_task *child; struct rpc_task *child;
int status; int status;
dprintk("RPC: %4d rpc_getport(%s, %u, %u, %d)\n", dprintk("RPC: %5u rpc_getport(%s, %u, %u, %d)\n",
task->tk_pid, clnt->cl_server, task->tk_pid, clnt->cl_server,
clnt->cl_prog, clnt->cl_vers, xprt->prot); clnt->cl_prog, clnt->cl_vers, xprt->prot);
...@@ -221,7 +221,7 @@ static void pmap_getport_done(struct rpc_task *child, void *data) ...@@ -221,7 +221,7 @@ static void pmap_getport_done(struct rpc_task *child, void *data)
status = 0; status = 0;
} }
dprintk("RPC: %4d pmap_getport_done(status %d, port %u)\n", dprintk("RPC: %5u pmap_getport_done(status %d, port %u)\n",
child->tk_pid, status, map->pm_port); child->tk_pid, status, map->pm_port);
pmap_wake_portmap_waiters(xprt, status); pmap_wake_portmap_waiters(xprt, status);
...@@ -263,7 +263,8 @@ int rpc_register(u32 prog, u32 vers, int prot, unsigned short port, int *okay) ...@@ -263,7 +263,8 @@ int rpc_register(u32 prog, u32 vers, int prot, unsigned short port, int *okay)
pmap_clnt = pmap_create("localhost", &sin, IPPROTO_UDP, 1); pmap_clnt = pmap_create("localhost", &sin, IPPROTO_UDP, 1);
if (IS_ERR(pmap_clnt)) { if (IS_ERR(pmap_clnt)) {
error = PTR_ERR(pmap_clnt); error = PTR_ERR(pmap_clnt);
dprintk("RPC: couldn't create pmap client. Error = %d\n", error); dprintk("RPC: couldn't create pmap client. Error = %d\n",
error);
return error; return error;
} }
...@@ -306,7 +307,8 @@ static struct rpc_clnt *pmap_create(char *hostname, struct sockaddr_in *srvaddr, ...@@ -306,7 +307,8 @@ static struct rpc_clnt *pmap_create(char *hostname, struct sockaddr_in *srvaddr,
static int xdr_encode_mapping(struct rpc_rqst *req, __be32 *p, struct portmap_args *map) static int xdr_encode_mapping(struct rpc_rqst *req, __be32 *p, struct portmap_args *map)
{ {
dprintk("RPC: xdr_encode_mapping(%u, %u, %u, %u)\n", dprintk("RPC: xdr_encode_mapping(%u, %u, %u, %u)\n",
map->pm_prog, map->pm_vers, map->pm_prot, map->pm_port); map->pm_prog, map->pm_vers,
map->pm_prot, map->pm_port);
*p++ = htonl(map->pm_prog); *p++ = htonl(map->pm_prog);
*p++ = htonl(map->pm_vers); *p++ = htonl(map->pm_vers);
*p++ = htonl(map->pm_prot); *p++ = htonl(map->pm_prot);
......
...@@ -74,7 +74,7 @@ static DEFINE_SPINLOCK(rpc_sched_lock); ...@@ -74,7 +74,7 @@ static DEFINE_SPINLOCK(rpc_sched_lock);
static inline void static inline void
__rpc_disable_timer(struct rpc_task *task) __rpc_disable_timer(struct rpc_task *task)
{ {
dprintk("RPC: %4d disabling timer\n", task->tk_pid); dprintk("RPC: %5u disabling timer\n", task->tk_pid);
task->tk_timeout_fn = NULL; task->tk_timeout_fn = NULL;
task->tk_timeout = 0; task->tk_timeout = 0;
} }
...@@ -93,7 +93,7 @@ static void rpc_run_timer(struct rpc_task *task) ...@@ -93,7 +93,7 @@ static void rpc_run_timer(struct rpc_task *task)
callback = task->tk_timeout_fn; callback = task->tk_timeout_fn;
task->tk_timeout_fn = NULL; task->tk_timeout_fn = NULL;
if (callback && RPC_IS_QUEUED(task)) { if (callback && RPC_IS_QUEUED(task)) {
dprintk("RPC: %4d running timer\n", task->tk_pid); dprintk("RPC: %5u running timer\n", task->tk_pid);
callback(task); callback(task);
} }
smp_mb__before_clear_bit(); smp_mb__before_clear_bit();
...@@ -110,7 +110,7 @@ __rpc_add_timer(struct rpc_task *task, rpc_action timer) ...@@ -110,7 +110,7 @@ __rpc_add_timer(struct rpc_task *task, rpc_action timer)
if (!task->tk_timeout) if (!task->tk_timeout)
return; return;
dprintk("RPC: %4d setting alarm for %lu ms\n", dprintk("RPC: %5u setting alarm for %lu ms\n",
task->tk_pid, task->tk_timeout * 1000 / HZ); task->tk_pid, task->tk_timeout * 1000 / HZ);
if (timer) if (timer)
...@@ -132,7 +132,7 @@ rpc_delete_timer(struct rpc_task *task) ...@@ -132,7 +132,7 @@ rpc_delete_timer(struct rpc_task *task)
return; return;
if (test_and_clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) { if (test_and_clear_bit(RPC_TASK_HAS_TIMER, &task->tk_runstate)) {
del_singleshot_timer_sync(&task->tk_timer); del_singleshot_timer_sync(&task->tk_timer);
dprintk("RPC: %4d deleting timer\n", task->tk_pid); dprintk("RPC: %5u deleting timer\n", task->tk_pid);
} }
} }
...@@ -179,7 +179,7 @@ static void __rpc_add_wait_queue(struct rpc_wait_queue *queue, struct rpc_task * ...@@ -179,7 +179,7 @@ static void __rpc_add_wait_queue(struct rpc_wait_queue *queue, struct rpc_task *
queue->qlen++; queue->qlen++;
rpc_set_queued(task); rpc_set_queued(task);
dprintk("RPC: %4d added to queue %p \"%s\"\n", dprintk("RPC: %5u added to queue %p \"%s\"\n",
task->tk_pid, queue, rpc_qname(queue)); task->tk_pid, queue, rpc_qname(queue));
} }
...@@ -212,7 +212,7 @@ static void __rpc_remove_wait_queue(struct rpc_task *task) ...@@ -212,7 +212,7 @@ static void __rpc_remove_wait_queue(struct rpc_task *task)
else else
list_del(&task->u.tk_wait.list); list_del(&task->u.tk_wait.list);
queue->qlen--; queue->qlen--;
dprintk("RPC: %4d removed from queue %p \"%s\"\n", dprintk("RPC: %5u removed from queue %p \"%s\"\n",
task->tk_pid, queue, rpc_qname(queue)); task->tk_pid, queue, rpc_qname(queue));
} }
...@@ -344,8 +344,8 @@ static void rpc_make_runnable(struct rpc_task *task) ...@@ -344,8 +344,8 @@ static void rpc_make_runnable(struct rpc_task *task)
static void __rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task, static void __rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task,
rpc_action action, rpc_action timer) rpc_action action, rpc_action timer)
{ {
dprintk("RPC: %4d sleep_on(queue \"%s\" time %ld)\n", task->tk_pid, dprintk("RPC: %5u sleep_on(queue \"%s\" time %lu)\n",
rpc_qname(q), jiffies); task->tk_pid, rpc_qname(q), jiffies);
if (!RPC_IS_ASYNC(task) && !RPC_IS_ACTIVATED(task)) { if (!RPC_IS_ASYNC(task) && !RPC_IS_ACTIVATED(task)) {
printk(KERN_ERR "RPC: Inactive synchronous task put to sleep!\n"); printk(KERN_ERR "RPC: Inactive synchronous task put to sleep!\n");
...@@ -381,7 +381,8 @@ void rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task, ...@@ -381,7 +381,8 @@ void rpc_sleep_on(struct rpc_wait_queue *q, struct rpc_task *task,
*/ */
static void __rpc_do_wake_up_task(struct rpc_task *task) static void __rpc_do_wake_up_task(struct rpc_task *task)
{ {
dprintk("RPC: %4d __rpc_wake_up_task (now %ld)\n", task->tk_pid, jiffies); dprintk("RPC: %5u __rpc_wake_up_task (now %lu)\n",
task->tk_pid, jiffies);
#ifdef RPC_DEBUG #ifdef RPC_DEBUG
BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID); BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);
...@@ -418,7 +419,7 @@ static void __rpc_wake_up_task(struct rpc_task *task) ...@@ -418,7 +419,7 @@ static void __rpc_wake_up_task(struct rpc_task *task)
static void static void
__rpc_default_timer(struct rpc_task *task) __rpc_default_timer(struct rpc_task *task)
{ {
dprintk("RPC: %d timeout (default timer)\n", task->tk_pid); dprintk("RPC: %5u timeout (default timer)\n", task->tk_pid);
task->tk_status = -ETIMEDOUT; task->tk_status = -ETIMEDOUT;
rpc_wake_up_task(task); rpc_wake_up_task(task);
} }
...@@ -502,7 +503,8 @@ struct rpc_task * rpc_wake_up_next(struct rpc_wait_queue *queue) ...@@ -502,7 +503,8 @@ struct rpc_task * rpc_wake_up_next(struct rpc_wait_queue *queue)
{ {
struct rpc_task *task = NULL; struct rpc_task *task = NULL;
dprintk("RPC: wake_up_next(%p \"%s\")\n", queue, rpc_qname(queue)); dprintk("RPC: wake_up_next(%p \"%s\")\n",
queue, rpc_qname(queue));
rcu_read_lock_bh(); rcu_read_lock_bh();
spin_lock(&queue->lock); spin_lock(&queue->lock);
if (RPC_IS_PRIORITY(queue)) if (RPC_IS_PRIORITY(queue))
...@@ -629,7 +631,7 @@ static void __rpc_execute(struct rpc_task *task) ...@@ -629,7 +631,7 @@ static void __rpc_execute(struct rpc_task *task)
{ {
int status = 0; int status = 0;
dprintk("RPC: %4d rpc_execute flgs %x\n", dprintk("RPC: %5u __rpc_execute flags=0x%x\n",
task->tk_pid, task->tk_flags); task->tk_pid, task->tk_flags);
BUG_ON(RPC_IS_QUEUED(task)); BUG_ON(RPC_IS_QUEUED(task));
...@@ -686,7 +688,7 @@ static void __rpc_execute(struct rpc_task *task) ...@@ -686,7 +688,7 @@ static void __rpc_execute(struct rpc_task *task)
} }
/* sync task: sleep here */ /* sync task: sleep here */
dprintk("RPC: %4d sync task going to sleep\n", task->tk_pid); dprintk("RPC: %5u sync task going to sleep\n", task->tk_pid);
/* Note: Caller should be using rpc_clnt_sigmask() */ /* Note: Caller should be using rpc_clnt_sigmask() */
status = out_of_line_wait_on_bit(&task->tk_runstate, status = out_of_line_wait_on_bit(&task->tk_runstate,
RPC_TASK_QUEUED, rpc_wait_bit_interruptible, RPC_TASK_QUEUED, rpc_wait_bit_interruptible,
...@@ -698,16 +700,17 @@ static void __rpc_execute(struct rpc_task *task) ...@@ -698,16 +700,17 @@ static void __rpc_execute(struct rpc_task *task)
* clean up after sleeping on some queue, we don't * clean up after sleeping on some queue, we don't
* break the loop here, but go around once more. * break the loop here, but go around once more.
*/ */
dprintk("RPC: %4d got signal\n", task->tk_pid); dprintk("RPC: %5u got signal\n", task->tk_pid);
task->tk_flags |= RPC_TASK_KILLED; task->tk_flags |= RPC_TASK_KILLED;
rpc_exit(task, -ERESTARTSYS); rpc_exit(task, -ERESTARTSYS);
rpc_wake_up_task(task); rpc_wake_up_task(task);
} }
rpc_set_running(task); rpc_set_running(task);
dprintk("RPC: %4d sync task resuming\n", task->tk_pid); dprintk("RPC: %5u sync task resuming\n", task->tk_pid);
} }
dprintk("RPC: %4d, return %d, status %d\n", task->tk_pid, status, task->tk_status); dprintk("RPC: %5u return %d, status %d\n", task->tk_pid, status,
task->tk_status);
/* Release all resources associated with the task */ /* Release all resources associated with the task */
rpc_release_task(task); rpc_release_task(task);
} }
...@@ -824,7 +827,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons ...@@ -824,7 +827,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons
/* starting timestamp */ /* starting timestamp */
task->tk_start = jiffies; task->tk_start = jiffies;
dprintk("RPC: %4d new task procpid %d\n", task->tk_pid, dprintk("RPC: new task initialized, procpid %u\n",
current->pid); current->pid);
} }
...@@ -837,7 +840,7 @@ rpc_alloc_task(void) ...@@ -837,7 +840,7 @@ rpc_alloc_task(void)
static void rpc_free_task(struct rcu_head *rcu) static void rpc_free_task(struct rcu_head *rcu)
{ {
struct rpc_task *task = container_of(rcu, struct rpc_task, u.tk_rcu); struct rpc_task *task = container_of(rcu, struct rpc_task, u.tk_rcu);
dprintk("RPC: %4d freeing task\n", task->tk_pid); dprintk("RPC: %5u freeing task\n", task->tk_pid);
mempool_free(task, rpc_task_mempool); mempool_free(task, rpc_task_mempool);
} }
...@@ -856,7 +859,7 @@ struct rpc_task *rpc_new_task(struct rpc_clnt *clnt, int flags, const struct rpc ...@@ -856,7 +859,7 @@ struct rpc_task *rpc_new_task(struct rpc_clnt *clnt, int flags, const struct rpc
rpc_init_task(task, clnt, flags, tk_ops, calldata); rpc_init_task(task, clnt, flags, tk_ops, calldata);
dprintk("RPC: %4d allocated task\n", task->tk_pid); dprintk("RPC: allocated task %p\n", task);
task->tk_flags |= RPC_TASK_DYNAMIC; task->tk_flags |= RPC_TASK_DYNAMIC;
out: out:
return task; return task;
...@@ -900,7 +903,7 @@ static void rpc_release_task(struct rpc_task *task) ...@@ -900,7 +903,7 @@ static void rpc_release_task(struct rpc_task *task)
#ifdef RPC_DEBUG #ifdef RPC_DEBUG
BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID); BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);
#endif #endif
dprintk("RPC: %4d release task\n", task->tk_pid); dprintk("RPC: %5u release task\n", task->tk_pid);
/* Remove from global task list */ /* Remove from global task list */
spin_lock(&rpc_sched_lock); spin_lock(&rpc_sched_lock);
...@@ -982,7 +985,8 @@ static void rpciod_killall(void) ...@@ -982,7 +985,8 @@ static void rpciod_killall(void)
rpc_killall_tasks(NULL); rpc_killall_tasks(NULL);
flush_workqueue(rpciod_workqueue); flush_workqueue(rpciod_workqueue);
if (!list_empty(&all_tasks)) { if (!list_empty(&all_tasks)) {
dprintk("rpciod_killall: waiting for tasks to exit\n"); dprintk("RPC: rpciod_killall: waiting for tasks "
"to exit\n");
yield(); yield();
} }
} }
...@@ -1002,7 +1006,7 @@ rpciod_up(void) ...@@ -1002,7 +1006,7 @@ rpciod_up(void)
int error = 0; int error = 0;
mutex_lock(&rpciod_mutex); mutex_lock(&rpciod_mutex);
dprintk("rpciod_up: users %d\n", rpciod_users); dprintk("RPC: rpciod_up: users %u\n", rpciod_users);
rpciod_users++; rpciod_users++;
if (rpciod_workqueue) if (rpciod_workqueue)
goto out; goto out;
...@@ -1010,7 +1014,7 @@ rpciod_up(void) ...@@ -1010,7 +1014,7 @@ rpciod_up(void)
* If there's no pid, we should be the first user. * If there's no pid, we should be the first user.
*/ */
if (rpciod_users > 1) if (rpciod_users > 1)
printk(KERN_WARNING "rpciod_up: no workqueue, %d users??\n", rpciod_users); printk(KERN_WARNING "rpciod_up: no workqueue, %u users??\n", rpciod_users);
/* /*
* Create the rpciod thread and wait for it to start. * Create the rpciod thread and wait for it to start.
*/ */
...@@ -1032,7 +1036,7 @@ void ...@@ -1032,7 +1036,7 @@ void
rpciod_down(void) rpciod_down(void)
{ {
mutex_lock(&rpciod_mutex); mutex_lock(&rpciod_mutex);
dprintk("rpciod_down sema %d\n", rpciod_users); dprintk("RPC: rpciod_down sema %u\n", rpciod_users);
if (rpciod_users) { if (rpciod_users) {
if (--rpciod_users) if (--rpciod_users)
goto out; goto out;
...@@ -1040,7 +1044,7 @@ rpciod_down(void) ...@@ -1040,7 +1044,7 @@ rpciod_down(void)
printk(KERN_WARNING "rpciod_down: no users??\n"); printk(KERN_WARNING "rpciod_down: no users??\n");
if (!rpciod_workqueue) { if (!rpciod_workqueue) {
dprintk("rpciod_down: Nothing to do!\n"); dprintk("RPC: rpciod_down: Nothing to do!\n");
goto out; goto out;
} }
rpciod_killall(); rpciod_killall();
...@@ -1070,7 +1074,7 @@ void rpc_show_tasks(void) ...@@ -1070,7 +1074,7 @@ void rpc_show_tasks(void)
if (RPC_IS_QUEUED(t)) if (RPC_IS_QUEUED(t))
rpc_waitq = rpc_qname(t->u.tk_wait.rpc_waitq); rpc_waitq = rpc_qname(t->u.tk_wait.rpc_waitq);
printk("%05d %04d %04x %06d %8p %6d %8p %08ld %8s %8p %8p\n", printk("%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p\n",
t->tk_pid, t->tk_pid,
(t->tk_msg.rpc_proc ? t->tk_msg.rpc_proc->p_proc : -1), (t->tk_msg.rpc_proc ? t->tk_msg.rpc_proc->p_proc : -1),
t->tk_flags, t->tk_status, t->tk_flags, t->tk_status,
......
...@@ -317,7 +317,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, ...@@ -317,7 +317,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
for (i = 0; i < serv->sv_nrpools; i++) { for (i = 0; i < serv->sv_nrpools; i++) {
struct svc_pool *pool = &serv->sv_pools[i]; struct svc_pool *pool = &serv->sv_pools[i];
dprintk("initialising pool %u for %s\n", dprintk("svc: initialising pool %u for %s\n",
i, serv->sv_name); i, serv->sv_name);
pool->sp_id = i; pool->sp_id = i;
...@@ -368,7 +368,7 @@ svc_destroy(struct svc_serv *serv) ...@@ -368,7 +368,7 @@ svc_destroy(struct svc_serv *serv)
{ {
struct svc_sock *svsk; struct svc_sock *svsk;
dprintk("RPC: svc_destroy(%s, %d)\n", dprintk("svc: svc_destroy(%s, %d)\n",
serv->sv_program->pg_name, serv->sv_program->pg_name,
serv->sv_nrthreads); serv->sv_nrthreads);
...@@ -654,7 +654,7 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port) ...@@ -654,7 +654,7 @@ svc_register(struct svc_serv *serv, int proto, unsigned short port)
if (progp->pg_vers[i] == NULL) if (progp->pg_vers[i] == NULL)
continue; continue;
dprintk("RPC: svc_register(%s, %s, %d, %d)%s\n", dprintk("svc: svc_register(%s, %s, %d, %d)%s\n",
progp->pg_name, progp->pg_name,
proto == IPPROTO_UDP? "udp" : "tcp", proto == IPPROTO_UDP? "udp" : "tcp",
port, port,
......
...@@ -108,7 +108,7 @@ int xprt_reserve_xprt(struct rpc_task *task) ...@@ -108,7 +108,7 @@ int xprt_reserve_xprt(struct rpc_task *task)
return 1; return 1;
out_sleep: out_sleep:
dprintk("RPC: %4d failed to lock transport %p\n", dprintk("RPC: %5u failed to lock transport %p\n",
task->tk_pid, xprt); task->tk_pid, xprt);
task->tk_timeout = 0; task->tk_timeout = 0;
task->tk_status = -EAGAIN; task->tk_status = -EAGAIN;
...@@ -158,7 +158,7 @@ int xprt_reserve_xprt_cong(struct rpc_task *task) ...@@ -158,7 +158,7 @@ int xprt_reserve_xprt_cong(struct rpc_task *task)
} }
xprt_clear_locked(xprt); xprt_clear_locked(xprt);
out_sleep: out_sleep:
dprintk("RPC: %4d failed to lock transport %p\n", task->tk_pid, xprt); dprintk("RPC: %5u failed to lock transport %p\n", task->tk_pid, xprt);
task->tk_timeout = 0; task->tk_timeout = 0;
task->tk_status = -EAGAIN; task->tk_status = -EAGAIN;
if (req && req->rq_ntrans) if (req && req->rq_ntrans)
...@@ -281,7 +281,7 @@ __xprt_get_cong(struct rpc_xprt *xprt, struct rpc_task *task) ...@@ -281,7 +281,7 @@ __xprt_get_cong(struct rpc_xprt *xprt, struct rpc_task *task)
if (req->rq_cong) if (req->rq_cong)
return 1; return 1;
dprintk("RPC: %4d xprt_cwnd_limited cong = %ld cwnd = %ld\n", dprintk("RPC: %5u xprt_cwnd_limited cong = %lu cwnd = %lu\n",
task->tk_pid, xprt->cong, xprt->cwnd); task->tk_pid, xprt->cong, xprt->cwnd);
if (RPCXPRT_CONGESTED(xprt)) if (RPCXPRT_CONGESTED(xprt))
return 0; return 0;
...@@ -387,8 +387,8 @@ void xprt_write_space(struct rpc_xprt *xprt) ...@@ -387,8 +387,8 @@ void xprt_write_space(struct rpc_xprt *xprt)
spin_lock_bh(&xprt->transport_lock); spin_lock_bh(&xprt->transport_lock);
if (xprt->snd_task) { if (xprt->snd_task) {
dprintk("RPC: write space: waking waiting task on xprt %p\n", dprintk("RPC: write space: waking waiting task on "
xprt); "xprt %p\n", xprt);
rpc_wake_up_task(xprt->snd_task); rpc_wake_up_task(xprt->snd_task);
} }
spin_unlock_bh(&xprt->transport_lock); spin_unlock_bh(&xprt->transport_lock);
...@@ -530,7 +530,7 @@ void xprt_connect(struct rpc_task *task) ...@@ -530,7 +530,7 @@ void xprt_connect(struct rpc_task *task)
{ {
struct rpc_xprt *xprt = task->tk_xprt; struct rpc_xprt *xprt = task->tk_xprt;
dprintk("RPC: %4d xprt_connect xprt %p %s connected\n", task->tk_pid, dprintk("RPC: %5u xprt_connect xprt %p %s connected\n", task->tk_pid,
xprt, (xprt_connected(xprt) ? "is" : "is not")); xprt, (xprt_connected(xprt) ? "is" : "is not"));
if (!xprt_bound(xprt)) { if (!xprt_bound(xprt)) {
...@@ -560,7 +560,7 @@ static void xprt_connect_status(struct rpc_task *task) ...@@ -560,7 +560,7 @@ static void xprt_connect_status(struct rpc_task *task)
if (task->tk_status >= 0) { if (task->tk_status >= 0) {
xprt->stat.connect_count++; xprt->stat.connect_count++;
xprt->stat.connect_time += (long)jiffies - xprt->stat.connect_start; xprt->stat.connect_time += (long)jiffies - xprt->stat.connect_start;
dprintk("RPC: %4d xprt_connect_status: connection established\n", dprintk("RPC: %5u xprt_connect_status: connection established\n",
task->tk_pid); task->tk_pid);
return; return;
} }
...@@ -568,20 +568,22 @@ static void xprt_connect_status(struct rpc_task *task) ...@@ -568,20 +568,22 @@ static void xprt_connect_status(struct rpc_task *task)
switch (task->tk_status) { switch (task->tk_status) {
case -ECONNREFUSED: case -ECONNREFUSED:
case -ECONNRESET: case -ECONNRESET:
dprintk("RPC: %4d xprt_connect_status: server %s refused connection\n", dprintk("RPC: %5u xprt_connect_status: server %s refused "
task->tk_pid, task->tk_client->cl_server); "connection\n", task->tk_pid,
task->tk_client->cl_server);
break; break;
case -ENOTCONN: case -ENOTCONN:
dprintk("RPC: %4d xprt_connect_status: connection broken\n", dprintk("RPC: %5u xprt_connect_status: connection broken\n",
task->tk_pid); task->tk_pid);
break; break;
case -ETIMEDOUT: case -ETIMEDOUT:
dprintk("RPC: %4d xprt_connect_status: connect attempt timed out\n", dprintk("RPC: %5u xprt_connect_status: connect attempt timed "
task->tk_pid); "out\n", task->tk_pid);
break; break;
default: default:
dprintk("RPC: %4d xprt_connect_status: error %d connecting to server %s\n", dprintk("RPC: %5u xprt_connect_status: error %d connecting to "
task->tk_pid, -task->tk_status, task->tk_client->cl_server); "server %s\n", task->tk_pid, -task->tk_status,
task->tk_client->cl_server);
xprt_release_write(xprt, task); xprt_release_write(xprt, task);
task->tk_status = -EIO; task->tk_status = -EIO;
} }
...@@ -602,6 +604,9 @@ struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid) ...@@ -602,6 +604,9 @@ struct rpc_rqst *xprt_lookup_rqst(struct rpc_xprt *xprt, __be32 xid)
if (entry->rq_xid == xid) if (entry->rq_xid == xid)
return entry; return entry;
} }
dprintk("RPC: xprt_lookup_rqst did not find xid %08x\n",
ntohl(xid));
xprt->stat.bad_xids++; xprt->stat.bad_xids++;
return NULL; return NULL;
} }
...@@ -654,7 +659,7 @@ static void xprt_timer(struct rpc_task *task) ...@@ -654,7 +659,7 @@ static void xprt_timer(struct rpc_task *task)
struct rpc_rqst *req = task->tk_rqstp; struct rpc_rqst *req = task->tk_rqstp;
struct rpc_xprt *xprt = req->rq_xprt; struct rpc_xprt *xprt = req->rq_xprt;
dprintk("RPC: %4d xprt_timer\n", task->tk_pid); dprintk("RPC: %5u xprt_timer\n", task->tk_pid);
spin_lock(&xprt->transport_lock); spin_lock(&xprt->transport_lock);
if (!req->rq_received) { if (!req->rq_received) {
...@@ -678,7 +683,7 @@ int xprt_prepare_transmit(struct rpc_task *task) ...@@ -678,7 +683,7 @@ int xprt_prepare_transmit(struct rpc_task *task)
struct rpc_xprt *xprt = req->rq_xprt; struct rpc_xprt *xprt = req->rq_xprt;
int err = 0; int err = 0;
dprintk("RPC: %4d xprt_prepare_transmit\n", task->tk_pid); dprintk("RPC: %5u xprt_prepare_transmit\n", task->tk_pid);
spin_lock_bh(&xprt->transport_lock); spin_lock_bh(&xprt->transport_lock);
if (req->rq_received && !req->rq_bytes_sent) { if (req->rq_received && !req->rq_bytes_sent) {
...@@ -716,7 +721,7 @@ void xprt_transmit(struct rpc_task *task) ...@@ -716,7 +721,7 @@ void xprt_transmit(struct rpc_task *task)
struct rpc_xprt *xprt = req->rq_xprt; struct rpc_xprt *xprt = req->rq_xprt;
int status; int status;
dprintk("RPC: %4d xprt_transmit(%u)\n", task->tk_pid, req->rq_slen); dprintk("RPC: %5u xprt_transmit(%u)\n", task->tk_pid, req->rq_slen);
if (!req->rq_received) { if (!req->rq_received) {
if (list_empty(&req->rq_list)) { if (list_empty(&req->rq_list)) {
...@@ -736,7 +741,7 @@ void xprt_transmit(struct rpc_task *task) ...@@ -736,7 +741,7 @@ void xprt_transmit(struct rpc_task *task)
status = xprt->ops->send_request(task); status = xprt->ops->send_request(task);
if (status == 0) { if (status == 0) {
dprintk("RPC: %4d xmit complete\n", task->tk_pid); dprintk("RPC: %5u xmit complete\n", task->tk_pid);
spin_lock_bh(&xprt->transport_lock); spin_lock_bh(&xprt->transport_lock);
xprt->ops->set_retrans_timeout(task); xprt->ops->set_retrans_timeout(task);
...@@ -822,7 +827,7 @@ static void xprt_request_init(struct rpc_task *task, struct rpc_xprt *xprt) ...@@ -822,7 +827,7 @@ static void xprt_request_init(struct rpc_task *task, struct rpc_xprt *xprt)
req->rq_xid = xprt_alloc_xid(xprt); req->rq_xid = xprt_alloc_xid(xprt);
req->rq_release_snd_buf = NULL; req->rq_release_snd_buf = NULL;
xprt_reset_majortimeo(req); xprt_reset_majortimeo(req);
dprintk("RPC: %4d reserved req %p xid %08x\n", task->tk_pid, dprintk("RPC: %5u reserved req %p xid %08x\n", task->tk_pid,
req, ntohl(req->rq_xid)); req, ntohl(req->rq_xid));
} }
...@@ -856,7 +861,7 @@ void xprt_release(struct rpc_task *task) ...@@ -856,7 +861,7 @@ void xprt_release(struct rpc_task *task)
req->rq_release_snd_buf(req); req->rq_release_snd_buf(req);
memset(req, 0, sizeof(*req)); /* mark unused */ memset(req, 0, sizeof(*req)); /* mark unused */
dprintk("RPC: %4d release request %p\n", task->tk_pid, req); dprintk("RPC: %5u release request %p\n", task->tk_pid, req);
spin_lock(&xprt->reserve_lock); spin_lock(&xprt->reserve_lock);
list_add(&req->rq_list, &xprt->free); list_add(&req->rq_list, &xprt->free);
......
...@@ -418,7 +418,7 @@ static void xs_nospace(struct rpc_task *task) ...@@ -418,7 +418,7 @@ static void xs_nospace(struct rpc_task *task)
struct rpc_xprt *xprt = req->rq_xprt; struct rpc_xprt *xprt = req->rq_xprt;
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
dprintk("RPC: %4d xmit incomplete (%u left of %u)\n", dprintk("RPC: %5u xmit incomplete (%u left of %u)\n",
task->tk_pid, req->rq_slen - req->rq_bytes_sent, task->tk_pid, req->rq_slen - req->rq_bytes_sent,
req->rq_slen); req->rq_slen);
...@@ -855,17 +855,18 @@ static inline void xs_tcp_read_request(struct rpc_xprt *xprt, struct xdr_skb_rea ...@@ -855,17 +855,18 @@ static inline void xs_tcp_read_request(struct rpc_xprt *xprt, struct xdr_skb_rea
transport->tcp_flags &= ~TCP_RCV_COPY_DATA; transport->tcp_flags &= ~TCP_RCV_COPY_DATA;
dprintk("RPC: XID %08x truncated request\n", dprintk("RPC: XID %08x truncated request\n",
ntohl(transport->tcp_xid)); ntohl(transport->tcp_xid));
dprintk("RPC: xprt = %p, tcp_copied = %lu, tcp_offset = %u, tcp_reclen = %u\n", dprintk("RPC: xprt = %p, tcp_copied = %lu, "
xprt, transport->tcp_copied, transport->tcp_offset, "tcp_offset = %u, tcp_reclen = %u\n",
transport->tcp_reclen); xprt, transport->tcp_copied,
transport->tcp_offset, transport->tcp_reclen);
goto out; goto out;
} }
dprintk("RPC: XID %08x read %Zd bytes\n", dprintk("RPC: XID %08x read %Zd bytes\n",
ntohl(transport->tcp_xid), r); ntohl(transport->tcp_xid), r);
dprintk("RPC: xprt = %p, tcp_copied = %lu, tcp_offset = %u, tcp_reclen = %u\n", dprintk("RPC: xprt = %p, tcp_copied = %lu, tcp_offset = %u, "
xprt, transport->tcp_copied, transport->tcp_offset, "tcp_reclen = %u\n", xprt, transport->tcp_copied,
transport->tcp_reclen); transport->tcp_offset, transport->tcp_reclen);
if (transport->tcp_copied == req->rq_private_buf.buflen) if (transport->tcp_copied == req->rq_private_buf.buflen)
transport->tcp_flags &= ~TCP_RCV_COPY_DATA; transport->tcp_flags &= ~TCP_RCV_COPY_DATA;
...@@ -941,8 +942,9 @@ static void xs_tcp_data_ready(struct sock *sk, int bytes) ...@@ -941,8 +942,9 @@ static void xs_tcp_data_ready(struct sock *sk, int bytes)
struct rpc_xprt *xprt; struct rpc_xprt *xprt;
read_descriptor_t rd_desc; read_descriptor_t rd_desc;
read_lock(&sk->sk_callback_lock);
dprintk("RPC: xs_tcp_data_ready...\n"); dprintk("RPC: xs_tcp_data_ready...\n");
read_lock(&sk->sk_callback_lock);
if (!(xprt = xprt_from_sock(sk))) if (!(xprt = xprt_from_sock(sk)))
goto out; goto out;
if (xprt->shutdown) if (xprt->shutdown)
...@@ -1309,7 +1311,8 @@ static void xs_tcp_connect_worker(struct work_struct *work) ...@@ -1309,7 +1311,8 @@ static void xs_tcp_connect_worker(struct work_struct *work)
if (!sock) { if (!sock) {
/* start from scratch */ /* start from scratch */
if ((err = sock_create_kern(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock)) < 0) { if ((err = sock_create_kern(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock)) < 0) {
dprintk("RPC: can't create TCP transport socket (%d).\n", -err); dprintk("RPC: can't create TCP transport "
"socket (%d).\n", -err);
goto out; goto out;
} }
xs_reclassify_socket(sock); xs_reclassify_socket(sock);
...@@ -1360,7 +1363,8 @@ static void xs_tcp_connect_worker(struct work_struct *work) ...@@ -1360,7 +1363,8 @@ static void xs_tcp_connect_worker(struct work_struct *work)
status = kernel_connect(sock, (struct sockaddr *) &xprt->addr, status = kernel_connect(sock, (struct sockaddr *) &xprt->addr,
xprt->addrlen, O_NONBLOCK); xprt->addrlen, O_NONBLOCK);
dprintk("RPC: %p connect status %d connected %d sock state %d\n", dprintk("RPC: %p connect status %d connected %d sock state %d\n",
xprt, -status, xprt_connected(xprt), sock->sk->sk_state); xprt, -status, xprt_connected(xprt),
sock->sk->sk_state);
if (status < 0) { if (status < 0) {
switch (status) { switch (status) {
case -EINPROGRESS: case -EINPROGRESS:
...@@ -1404,7 +1408,8 @@ static void xs_connect(struct rpc_task *task) ...@@ -1404,7 +1408,8 @@ static void xs_connect(struct rpc_task *task)
return; return;
if (transport->sock != NULL) { if (transport->sock != NULL) {
dprintk("RPC: xs_connect delayed xprt %p for %lu seconds\n", dprintk("RPC: xs_connect delayed xprt %p for %lu "
"seconds\n",
xprt, xprt->reestablish_timeout / HZ); xprt, xprt->reestablish_timeout / HZ);
schedule_delayed_work(&transport->connect_worker, schedule_delayed_work(&transport->connect_worker,
xprt->reestablish_timeout); xprt->reestablish_timeout);
...@@ -1513,7 +1518,8 @@ static struct rpc_xprt *xs_setup_xprt(struct sockaddr *addr, size_t addrlen, uns ...@@ -1513,7 +1518,8 @@ static struct rpc_xprt *xs_setup_xprt(struct sockaddr *addr, size_t addrlen, uns
new = kzalloc(sizeof(*new), GFP_KERNEL); new = kzalloc(sizeof(*new), GFP_KERNEL);
if (new == NULL) { if (new == NULL) {
dprintk("RPC: xs_setup_xprt: couldn't allocate rpc_xprt\n"); dprintk("RPC: xs_setup_xprt: couldn't allocate "
"rpc_xprt\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
} }
xprt = &new->xprt; xprt = &new->xprt;
...@@ -1522,7 +1528,8 @@ static struct rpc_xprt *xs_setup_xprt(struct sockaddr *addr, size_t addrlen, uns ...@@ -1522,7 +1528,8 @@ static struct rpc_xprt *xs_setup_xprt(struct sockaddr *addr, size_t addrlen, uns
xprt->slot = kcalloc(xprt->max_reqs, sizeof(struct rpc_rqst), GFP_KERNEL); xprt->slot = kcalloc(xprt->max_reqs, sizeof(struct rpc_rqst), GFP_KERNEL);
if (xprt->slot == NULL) { if (xprt->slot == NULL) {
kfree(xprt); kfree(xprt);
dprintk("RPC: xs_setup_xprt: couldn't allocate slot table\n"); dprintk("RPC: xs_setup_xprt: couldn't allocate slot "
"table\n");
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment