Skip to content

Commit a3ca565

Browse files
chuckleverTrond Myklebust
authored andcommitted
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>
1 parent 02a2976 commit a3ca565

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎fs/nfs/nfs4proc.c‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,6 +1983,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
19831983
struct nfs4_state *state = calldata->state;
19841984
struct nfs_server *server = NFS_SERVER(calldata->inode);
19851985

1986+
dprintk("%s: begin!\n", __func__);
19861987
if (!nfs4_sequence_done(task, &calldata->res.seq_res))
19871988
return;
19881989
/* 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)
20102011
}
20112012
nfs_release_seqid(calldata->arg.seqid);
20122013
nfs_refresh_inode(calldata->inode, calldata->res.fattr);
2014+
dprintk("%s: done, ret = %d!\n", __func__, task->tk_status);
20132015
}
20142016

20152017
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)
20182020
struct nfs4_state *state = calldata->state;
20192021
int call_close = 0;
20202022

2023+
dprintk("%s: begin!\n", __func__);
20212024
if (nfs_wait_on_sequence(calldata->arg.seqid, task) != 0)
20222025
return;
20232026

@@ -2042,7 +2045,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
20422045
if (!call_close) {
20432046
/* Note: exit _without_ calling nfs4_close_done */
20442047
task->tk_action = NULL;
2045-
return;
2048+
goto out;
20462049
}
20472050

20482051
if (calldata->arg.fmode == 0) {
@@ -2051,7 +2054,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
20512054
pnfs_roc_drain(calldata->inode, &calldata->roc_barrier)) {
20522055
rpc_sleep_on(&NFS_SERVER(calldata->inode)->roc_rpcwaitq,
20532056
task, NULL);
2054-
return;
2057+
goto out;
20552058
}
20562059
}
20572060

@@ -2061,8 +2064,10 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
20612064
&calldata->arg.seq_args,
20622065
&calldata->res.seq_res,
20632066
task))
2064-
return;
2067+
goto out;
20652068
rpc_call_start(task);
2069+
out:
2070+
dprintk("%s: done!\n", __func__);
20662071
}
20672072

20682073
static const struct rpc_call_ops nfs4_close_ops = {

0 commit comments

Comments
 (0)