fs/nfs/nfs4proc.c | 18 +++++++++--------- include/linux/sunrpc/sched.h | 2 ++ net/sunrpc/sched.c | 4 +++- 3 files changed, 14 insertions(+), 10 deletions(-) diff -u --recursive --new-file --show-c-function linux-2.6.8-42-delegation_enable/fs/nfs/nfs4proc.c linux-2.6.8-43-nfs4_nointr/fs/nfs/nfs4proc.c --- linux-2.6.8-42-delegation_enable/fs/nfs/nfs4proc.c 2004-08-07 14:44:51.000000000 -0700 +++ linux-2.6.8-43-nfs4_nointr/fs/nfs/nfs4proc.c 2004-08-07 14:48:21.000000000 -0700 @@ -227,7 +227,7 @@ static int _nfs4_open_reclaim(struct nfs } o_arg.u.delegation_type = delegation->type; } - status = rpc_call_sync(server->client, &msg, 0); + status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); nfs4_increment_seqid(status, sp); if (status == 0) { memcpy(&state->stateid, &o_res.stateid, sizeof(state->stateid)); @@ -297,7 +297,7 @@ static int _nfs4_open_delegation_recall( arg.seqid = sp->so_seqid; arg.open_flags = state->state; memcpy(arg.u.delegation.data, state->stateid.data, sizeof(arg.u.delegation.data)); - status = rpc_call_sync(server->client, &msg, 0); + status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); nfs4_increment_seqid(status, sp); if (status >= 0) { memcpy(state->stateid.data, res.stateid.data, @@ -348,7 +348,7 @@ static int _nfs4_proc_open_confirm(struc }; int status; - status = rpc_call_sync(clnt, &msg, 0); + status = rpc_call_sync(clnt, &msg, RPC_TASK_NOINTR); nfs4_increment_seqid(status, sp); if (status >= 0) memcpy(stateid, &res.stateid, sizeof(*stateid)); @@ -526,7 +526,7 @@ static int _nfs4_do_open(struct inode *d o_arg.id = sp->so_id; o_arg.clientid = clp->cl_clientid; - status = rpc_call_sync(server->client, &msg, 0); + status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); nfs4_increment_seqid(status, sp); if (status) goto out_err; @@ -682,7 +682,7 @@ static int _nfs4_do_close(struct inode * memcpy(&arg.stateid, &state->stateid, sizeof(arg.stateid)); /* Serialization for the sequence id */ arg.seqid = sp->so_seqid, - status = rpc_call_sync(NFS_SERVER(inode)->client, &msg, 0); + status = rpc_call_sync(NFS_SERVER(inode)->client, &msg, RPC_TASK_NOINTR); /* hmm. we are done with the inode, and in the process of freeing * the state_owner. we keep this around to process errors @@ -733,7 +733,7 @@ static int _nfs4_do_downgrade(struct ino if (test_bit(NFS_DELEGATED_STATE, &state->flags)) return 0; memcpy(&arg.stateid, &state->stateid, sizeof(arg.stateid)); - status = rpc_call_sync(NFS_SERVER(inode)->client, &msg, 0); + status = rpc_call_sync(NFS_SERVER(inode)->client, &msg, RPC_TASK_NOINTR); nfs4_increment_seqid(status, sp); if (!status) memcpy(&state->stateid, &res.stateid, sizeof(state->stateid)); @@ -2398,7 +2398,7 @@ static int _nfs4_proc_unlck(struct nfs4_ luargs.seqid = lsp->ls_seqid; memcpy(&luargs.stateid, &lsp->ls_stateid, sizeof(luargs.stateid)); arg.u.locku = &luargs; - status = rpc_call_sync(server->client, &msg, 0); + status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); nfs4_increment_lock_seqid(status, lsp); } @@ -2474,7 +2474,7 @@ static int _nfs4_do_setlk(struct nfs4_st arg.u.lock = &largs; down(&owner->so_sema); otl.open_seqid = owner->so_seqid; - status = rpc_call_sync(server->client, &msg, 0); + status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); /* increment open_owner seqid on success, and * seqid mutating errors */ nfs4_increment_seqid(status, owner); @@ -2487,7 +2487,7 @@ static int _nfs4_do_setlk(struct nfs4_st largs.u.exist_lock = ⪙ largs.new_lock_owner = 0; arg.u.lock = &largs; - status = rpc_call_sync(server->client, &msg, 0); + status = rpc_call_sync(server->client, &msg, RPC_TASK_NOINTR); } /* increment seqid on success, and * seqid mutating errors*/ nfs4_increment_lock_seqid(status, lsp); diff -u --recursive --new-file --show-c-function linux-2.6.8-42-delegation_enable/include/linux/sunrpc/sched.h linux-2.6.8-43-nfs4_nointr/include/linux/sunrpc/sched.h --- linux-2.6.8-42-delegation_enable/include/linux/sunrpc/sched.h 2004-08-07 14:37:40.000000000 -0700 +++ linux-2.6.8-43-nfs4_nointr/include/linux/sunrpc/sched.h 2004-08-07 14:48:21.000000000 -0700 @@ -113,6 +113,7 @@ typedef void (*rpc_action)(struct rpc_ #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_TASK_NOINTR 0x0400 /* uninterruptible task */ #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) #define RPC_IS_SETUID(t) ((t)->tk_flags & RPC_TASK_SETUID) @@ -123,6 +124,7 @@ typedef void (*rpc_action)(struct rpc_ #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_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR) #define RPC_TASK_SLEEPING 0 #define RPC_TASK_RUNNING 1 diff -u --recursive --new-file --show-c-function linux-2.6.8-42-delegation_enable/net/sunrpc/sched.c linux-2.6.8-43-nfs4_nointr/net/sunrpc/sched.c --- linux-2.6.8-42-delegation_enable/net/sunrpc/sched.c 2004-08-07 14:37:10.000000000 -0700 +++ linux-2.6.8-43-nfs4_nointr/net/sunrpc/sched.c 2004-08-07 14:49:03.000000000 -0700 @@ -698,7 +698,7 @@ __rpc_execute(struct rpc_task *task) if (current->pid == rpciod_pid) printk(KERN_ERR "RPC: rpciod waiting on sync task!\n"); - if (!task->tk_client->cl_intr) { + if (RPC_TASK_UNINTERRUPTIBLE(task)) { __wait_event(task->tk_wait, !RPC_IS_SLEEPING(task)); } else { __wait_event_interruptible(task->tk_wait, !RPC_IS_SLEEPING(task), status); @@ -884,6 +884,8 @@ void rpc_init_task(struct rpc_task *task atomic_inc(&clnt->cl_users); if (clnt->cl_softrtry) task->tk_flags |= RPC_TASK_SOFT; + if (!clnt->cl_intr) + task->tk_flags |= RPC_TASK_NOINTR; } #ifdef RPC_DEBUG