NFS: Add debugging messages to NFSv4's CLOSE procedure
CLOSE is new with NFSv4. Sometimes it's important to know the timing of this operation compared to things like lease renewal. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>hifive-unleashed-5.1
parent
02a2976c91
commit
a3ca5651cb
|
@ -1983,6 +1983,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
|
||||||
struct nfs4_state *state = calldata->state;
|
struct nfs4_state *state = calldata->state;
|
||||||
struct nfs_server *server = NFS_SERVER(calldata->inode);
|
struct nfs_server *server = NFS_SERVER(calldata->inode);
|
||||||
|
|
||||||
|
dprintk("%s: begin!\n", __func__);
|
||||||
if (!nfs4_sequence_done(task, &calldata->res.seq_res))
|
if (!nfs4_sequence_done(task, &calldata->res.seq_res))
|
||||||
return;
|
return;
|
||||||
/* hmm. we are done with the inode, and in the process of freeing
|
/* hmm. we are done with the inode, and in the process of freeing
|
||||||
|
@ -2010,6 +2011,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
|
||||||
}
|
}
|
||||||
nfs_release_seqid(calldata->arg.seqid);
|
nfs_release_seqid(calldata->arg.seqid);
|
||||||
nfs_refresh_inode(calldata->inode, calldata->res.fattr);
|
nfs_refresh_inode(calldata->inode, calldata->res.fattr);
|
||||||
|
dprintk("%s: done, ret = %d!\n", __func__, task->tk_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nfs4_close_prepare(struct rpc_task *task, void *data)
|
static void nfs4_close_prepare(struct rpc_task *task, void *data)
|
||||||
|
@ -2018,6 +2020,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
|
||||||
struct nfs4_state *state = calldata->state;
|
struct nfs4_state *state = calldata->state;
|
||||||
int call_close = 0;
|
int call_close = 0;
|
||||||
|
|
||||||
|
dprintk("%s: begin!\n", __func__);
|
||||||
if (nfs_wait_on_sequence(calldata->arg.seqid, task) != 0)
|
if (nfs_wait_on_sequence(calldata->arg.seqid, task) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2042,7 +2045,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
|
||||||
if (!call_close) {
|
if (!call_close) {
|
||||||
/* Note: exit _without_ calling nfs4_close_done */
|
/* Note: exit _without_ calling nfs4_close_done */
|
||||||
task->tk_action = NULL;
|
task->tk_action = NULL;
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (calldata->arg.fmode == 0) {
|
if (calldata->arg.fmode == 0) {
|
||||||
|
@ -2051,7 +2054,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
|
||||||
pnfs_roc_drain(calldata->inode, &calldata->roc_barrier)) {
|
pnfs_roc_drain(calldata->inode, &calldata->roc_barrier)) {
|
||||||
rpc_sleep_on(&NFS_SERVER(calldata->inode)->roc_rpcwaitq,
|
rpc_sleep_on(&NFS_SERVER(calldata->inode)->roc_rpcwaitq,
|
||||||
task, NULL);
|
task, NULL);
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2061,8 +2064,10 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
|
||||||
&calldata->arg.seq_args,
|
&calldata->arg.seq_args,
|
||||||
&calldata->res.seq_res,
|
&calldata->res.seq_res,
|
||||||
task))
|
task))
|
||||||
return;
|
goto out;
|
||||||
rpc_call_start(task);
|
rpc_call_start(task);
|
||||||
|
out:
|
||||||
|
dprintk("%s: done!\n", __func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct rpc_call_ops nfs4_close_ops = {
|
static const struct rpc_call_ops nfs4_close_ops = {
|
||||||
|
|
Loading…
Reference in New Issue