summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2012-03-01 17:00:40 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-02 15:36:34 -0500
commita3ca5651cb5eebe2e56e510bbf5cd60abc301c9f (patch)
treed4534407c920f07bad65b523ece54fe30ec3b41d /fs
parent02a2976c9180a7dcc43bc46cf69bd3687a9d7ea6 (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/nfs4proc.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 90a17cc3ebc9..6c8e170e2e6b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1983,6 +1983,7 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
1983 struct nfs4_state *state = calldata->state; 1983 struct nfs4_state *state = calldata->state;
1984 struct nfs_server *server = NFS_SERVER(calldata->inode); 1984 struct nfs_server *server = NFS_SERVER(calldata->inode);
1985 1985
1986 dprintk("%s: begin!\n", __func__);
1986 if (!nfs4_sequence_done(task, &calldata->res.seq_res)) 1987 if (!nfs4_sequence_done(task, &calldata->res.seq_res))
1987 return; 1988 return;
1988 /* hmm. we are done with the inode, and in the process of freeing 1989 /* 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)
2010 } 2011 }
2011 nfs_release_seqid(calldata->arg.seqid); 2012 nfs_release_seqid(calldata->arg.seqid);
2012 nfs_refresh_inode(calldata->inode, calldata->res.fattr); 2013 nfs_refresh_inode(calldata->inode, calldata->res.fattr);
2014 dprintk("%s: done, ret = %d!\n", __func__, task->tk_status);
2013} 2015}
2014 2016
2015static void nfs4_close_prepare(struct rpc_task *task, void *data) 2017static 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)
2018 struct nfs4_state *state = calldata->state; 2020 struct nfs4_state *state = calldata->state;
2019 int call_close = 0; 2021 int call_close = 0;
2020 2022
2023 dprintk("%s: begin!\n", __func__);
2021 if (nfs_wait_on_sequence(calldata->arg.seqid, task) != 0) 2024 if (nfs_wait_on_sequence(calldata->arg.seqid, task) != 0)
2022 return; 2025 return;
2023 2026
@@ -2042,7 +2045,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
2042 if (!call_close) { 2045 if (!call_close) {
2043 /* Note: exit _without_ calling nfs4_close_done */ 2046 /* Note: exit _without_ calling nfs4_close_done */
2044 task->tk_action = NULL; 2047 task->tk_action = NULL;
2045 return; 2048 goto out;
2046 } 2049 }
2047 2050
2048 if (calldata->arg.fmode == 0) { 2051 if (calldata->arg.fmode == 0) {
@@ -2051,7 +2054,7 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
2051 pnfs_roc_drain(calldata->inode, &calldata->roc_barrier)) { 2054 pnfs_roc_drain(calldata->inode, &calldata->roc_barrier)) {
2052 rpc_sleep_on(&NFS_SERVER(calldata->inode)->roc_rpcwaitq, 2055 rpc_sleep_on(&NFS_SERVER(calldata->inode)->roc_rpcwaitq,
2053 task, NULL); 2056 task, NULL);
2054 return; 2057 goto out;
2055 } 2058 }
2056 } 2059 }
2057 2060
@@ -2061,8 +2064,10 @@ static void nfs4_close_prepare(struct rpc_task *task, void *data)
2061 &calldata->arg.seq_args, 2064 &calldata->arg.seq_args,
2062 &calldata->res.seq_res, 2065 &calldata->res.seq_res,
2063 task)) 2066 task))
2064 return; 2067 goto out;
2065 rpc_call_start(task); 2068 rpc_call_start(task);
2069out:
2070 dprintk("%s: done!\n", __func__);
2066} 2071}
2067 2072
2068static const struct rpc_call_ops nfs4_close_ops = { 2073static const struct rpc_call_ops nfs4_close_ops = {