fs/nfs/nfs4proc.c | 3 ++- include/linux/sunrpc/sched.h | 2 ++ net/sunrpc/clnt.c | 4 ++-- net/sunrpc/sched.c | 5 ++++- net/sunrpc/xprt.c | 6 +++--- 5 files changed, 13 insertions(+), 7 deletions(-) diff -u --recursive --new-file linux-2.6.0-18-state_recovery/fs/nfs/nfs4proc.c linux-2.6.0-19-soft/fs/nfs/nfs4proc.c --- linux-2.6.0-18-state_recovery/fs/nfs/nfs4proc.c 2003-11-03 16:34:48.000000000 -0500 +++ linux-2.6.0-19-soft/fs/nfs/nfs4proc.c 2003-11-03 16:38:00.000000000 -0500 @@ -1639,7 +1639,8 @@ .rpc_cred = clp->cl_cred, }; - return rpc_call_async(clp->cl_rpcclient, &msg, 0, renew_done, (void *)jiffies); + return rpc_call_async(clp->cl_rpcclient, &msg, RPC_TASK_SOFT, + renew_done, (void *)jiffies); } int diff -u --recursive --new-file linux-2.6.0-18-state_recovery/include/linux/sunrpc/sched.h linux-2.6.0-19-soft/include/linux/sunrpc/sched.h --- linux-2.6.0-18-state_recovery/include/linux/sunrpc/sched.h 2003-11-03 15:58:40.000000000 -0500 +++ linux-2.6.0-19-soft/include/linux/sunrpc/sched.h 2003-11-03 16:37:21.000000000 -0500 @@ -110,6 +110,7 @@ #define RPC_TASK_ROOTCREDS 0x0040 /* force root creds */ #define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */ #define RPC_TASK_KILLED 0x0100 /* task was killed */ +#define RPC_TASK_SOFT 0x0200 /* Use soft timeouts */ #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) #define RPC_IS_SETUID(t) ((t)->tk_flags & RPC_TASK_SETUID) @@ -119,6 +120,7 @@ #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) #define RPC_IS_ACTIVATED(t) ((t)->tk_active) #define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL) +#define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT) #define RPC_TASK_SLEEPING 0 #define RPC_TASK_RUNNING 1 diff -u --recursive --new-file linux-2.6.0-18-state_recovery/net/sunrpc/clnt.c linux-2.6.0-19-soft/net/sunrpc/clnt.c --- linux-2.6.0-18-state_recovery/net/sunrpc/clnt.c 2003-11-03 16:31:17.000000000 -0500 +++ linux-2.6.0-19-soft/net/sunrpc/clnt.c 2003-11-03 16:37:21.000000000 -0500 @@ -797,7 +797,7 @@ to->to_retries = clnt->cl_timeout.to_retries; dprintk("RPC: %4d call_timeout (major)\n", task->tk_pid); - if (clnt->cl_softrtry) { + if (RPC_IS_SOFT(task)) { if (clnt->cl_chatty) printk(KERN_NOTICE "%s: server %s not responding, timed out\n", clnt->cl_protname, clnt->cl_server); @@ -840,7 +840,7 @@ } if (task->tk_status < 12) { - if (!clnt->cl_softrtry) { + if (!RPC_IS_SOFT(task)) { task->tk_action = call_bind; clnt->cl_stats->rpcretrans++; goto out_retry; diff -u --recursive --new-file linux-2.6.0-18-state_recovery/net/sunrpc/sched.c linux-2.6.0-19-soft/net/sunrpc/sched.c --- linux-2.6.0-18-state_recovery/net/sunrpc/sched.c 2003-11-03 15:57:47.000000000 -0500 +++ linux-2.6.0-19-soft/net/sunrpc/sched.c 2003-11-03 16:37:21.000000000 -0500 @@ -731,8 +731,11 @@ list_add(&task->tk_task, &all_tasks); spin_unlock(&rpc_sched_lock); - if (clnt) + if (clnt) { atomic_inc(&clnt->cl_users); + if (clnt->cl_softrtry) + task->tk_flags |= RPC_TASK_SOFT; + } #ifdef RPC_DEBUG task->tk_magic = 0xf00baa; diff -u --recursive --new-file linux-2.6.0-18-state_recovery/net/sunrpc/xprt.c linux-2.6.0-19-soft/net/sunrpc/xprt.c --- linux-2.6.0-18-state_recovery/net/sunrpc/xprt.c 2003-11-03 16:31:17.000000000 -0500 +++ linux-2.6.0-19-soft/net/sunrpc/xprt.c 2003-11-03 16:37:21.000000000 -0500 @@ -488,7 +488,7 @@ case -ECONNREFUSED: case -ECONNRESET: case -ENOTCONN: - if (!task->tk_client->cl_softrtry) { + if (!RPC_IS_SOFT(task)) { rpc_delay(task, RPC_REESTABLISH_TIMEOUT); task->tk_status = -ENOTCONN; break; @@ -496,7 +496,7 @@ default: /* Report myriad other possible returns. If this file * system is soft mounted, just error out, like Solaris. */ - if (task->tk_client->cl_softrtry) { + if (RPC_IS_SOFT(task)) { printk(KERN_WARNING "RPC: error %d connecting to server %s, exiting\n", -status, task->tk_client->cl_server); @@ -530,7 +530,7 @@ } /* if soft mounted, just cause this RPC to fail */ - if (task->tk_client->cl_softrtry) + if (RPC_IS_SOFT(task)) task->tk_status = -EIO; switch (task->tk_status) {