aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorFred Isaman <iisaman@netapp.com>2011-01-06 06:36:32 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-01-06 14:46:32 -0500
commitf7e8917a67980924651a9e244510e63ef05c7755 (patch)
treefb00db5ef8b3b26793fae7a1186f1cd16205ab9d /fs/nfs/nfs4state.c
parent36840370845629e6cb4324d1dd4aff6778670503 (diff)
pnfs: layout roc code
A layout can request return-on-close. How this interacts with the forgetful model of never sending LAYOUTRETURNS is a bit ambiguous. We forget any layouts marked roc, and wait for them to be completely forgotten before continuing with the close. In addition, to compensate for races with any inflight LAYOUTGETs, and the fact that we do not get any layout stateid back from the server, we set the barrier to the worst case scenario of current_seqid + number of outstanding LAYOUTGETS. Signed-off-by: Fred Isaman <iisaman@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 6891dedd80f1..286084f148e3 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -606,8 +606,11 @@ static void __nfs4_close(struct path *path, struct nfs4_state *state,
606 if (!call_close) { 606 if (!call_close) {
607 nfs4_put_open_state(state); 607 nfs4_put_open_state(state);
608 nfs4_put_state_owner(owner); 608 nfs4_put_state_owner(owner);
609 } else 609 } else {
610 nfs4_do_close(path, state, gfp_mask, wait); 610 bool roc = pnfs_roc(state->inode);
611
612 nfs4_do_close(path, state, gfp_mask, wait, roc);
613 }
611} 614}
612 615
613void nfs4_close_state(struct path *path, struct nfs4_state *state, fmode_t fmode) 616void nfs4_close_state(struct path *path, struct nfs4_state *state, fmode_t fmode)