forked from luck/tmp_suning_uos_patched
nfs41: locku sequence setup/done support
Separate nfs4_locku calls from nfs41: sequence setup/done support Call nfs4_sequence_done from respective rpc_call_done methods. Note that we need to pass a pointer to the nfs_server in calls data for passing on to nfs4_sequence_done. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [pnfs: client data server write validate and release] Signed-off-by: Andy Adamson <andros@umich.edu> Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: nfs4_sequence_free_slot use nfs_client for data server] Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
66179efee3
commit
a893693c15
|
@ -3533,7 +3533,7 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
|
||||||
struct nfs4_unlockdata *p;
|
struct nfs4_unlockdata *p;
|
||||||
struct inode *inode = lsp->ls_state->inode;
|
struct inode *inode = lsp->ls_state->inode;
|
||||||
|
|
||||||
p = kmalloc(sizeof(*p), GFP_KERNEL);
|
p = kzalloc(sizeof(*p), GFP_KERNEL);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
p->arg.fh = NFS_FH(inode);
|
p->arg.fh = NFS_FH(inode);
|
||||||
|
@ -3564,6 +3564,8 @@ static void nfs4_locku_done(struct rpc_task *task, void *data)
|
||||||
{
|
{
|
||||||
struct nfs4_unlockdata *calldata = data;
|
struct nfs4_unlockdata *calldata = data;
|
||||||
|
|
||||||
|
nfs4_sequence_done(calldata->server, &calldata->res.seq_res,
|
||||||
|
task->tk_status);
|
||||||
if (RPC_ASSASSINATED(task))
|
if (RPC_ASSASSINATED(task))
|
||||||
return;
|
return;
|
||||||
switch (task->tk_status) {
|
switch (task->tk_status) {
|
||||||
|
@ -3582,6 +3584,8 @@ static void nfs4_locku_done(struct rpc_task *task, void *data)
|
||||||
if (nfs4_async_handle_error(task, calldata->server, NULL) == -EAGAIN)
|
if (nfs4_async_handle_error(task, calldata->server, NULL) == -EAGAIN)
|
||||||
rpc_restart_call(task);
|
rpc_restart_call(task);
|
||||||
}
|
}
|
||||||
|
nfs4_sequence_free_slot(calldata->server->nfs_client,
|
||||||
|
&calldata->res.seq_res);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nfs4_locku_prepare(struct rpc_task *task, void *data)
|
static void nfs4_locku_prepare(struct rpc_task *task, void *data)
|
||||||
|
@ -3596,6 +3600,10 @@ static void nfs4_locku_prepare(struct rpc_task *task, void *data)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
calldata->timestamp = jiffies;
|
calldata->timestamp = jiffies;
|
||||||
|
if (nfs4_setup_sequence(calldata->server->nfs_client,
|
||||||
|
&calldata->arg.seq_args,
|
||||||
|
&calldata->res.seq_res, 1, task))
|
||||||
|
return;
|
||||||
rpc_call_start(task);
|
rpc_call_start(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user