Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chuck Lever and committed by
Trond Myklebust
a3ca5651 02a2976c

+8 -3
+8 -3
fs/nfs/nfs4proc.c
··· 1983 1983 struct nfs4_state *state = calldata->state; 1984 1984 struct nfs_server *server = NFS_SERVER(calldata->inode); 1985 1985 1986 + dprintk("%s: begin!\n", __func__); 1986 1987 if (!nfs4_sequence_done(task, &calldata->res.seq_res)) 1987 1988 return; 1988 1989 /* hmm. we are done with the inode, and in the process of freeing ··· 2011 2010 } 2012 2011 nfs_release_seqid(calldata->arg.seqid); 2013 2012 nfs_refresh_inode(calldata->inode, calldata->res.fattr); 2013 + dprintk("%s: done, ret = %d!\n", __func__, task->tk_status); 2014 2014 } 2015 2015 2016 2016 static void nfs4_close_prepare(struct rpc_task *task, void *data) ··· 2020 2018 struct nfs4_state *state = calldata->state; 2021 2019 int call_close = 0; 2022 2020 2021 + dprintk("%s: begin!\n", __func__); 2023 2022 if (nfs_wait_on_sequence(calldata->arg.seqid, task) != 0) 2024 2023 return; 2025 2024 ··· 2045 2042 if (!call_close) { 2046 2043 /* Note: exit _without_ calling nfs4_close_done */ 2047 2044 task->tk_action = NULL; 2048 - return; 2045 + goto out; 2049 2046 } 2050 2047 2051 2048 if (calldata->arg.fmode == 0) { ··· 2054 2051 pnfs_roc_drain(calldata->inode, &calldata->roc_barrier)) { 2055 2052 rpc_sleep_on(&NFS_SERVER(calldata->inode)->roc_rpcwaitq, 2056 2053 task, NULL); 2057 - return; 2054 + goto out; 2058 2055 } 2059 2056 } 2060 2057 ··· 2064 2061 &calldata->arg.seq_args, 2065 2062 &calldata->res.seq_res, 2066 2063 task)) 2067 - return; 2064 + goto out; 2068 2065 rpc_call_start(task); 2066 + out: 2067 + dprintk("%s: done!\n", __func__); 2069 2068 } 2070 2069 2071 2070 static const struct rpc_call_ops nfs4_close_ops = {