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>
This commit is contained in:
Fred Isaman
2011-01-06 11:36:32 +00:00
committed by Trond Myklebust
parent 3684037084
commit f7e8917a67
7 changed files with 152 additions and 6 deletions

View File

@@ -606,8 +606,11 @@ static void __nfs4_close(struct path *path, struct nfs4_state *state,
if (!call_close) {
nfs4_put_open_state(state);
nfs4_put_state_owner(owner);
} else
nfs4_do_close(path, state, gfp_mask, wait);
} else {
bool roc = pnfs_roc(state->inode);
nfs4_do_close(path, state, gfp_mask, wait, roc);
}
}
void nfs4_close_state(struct path *path, struct nfs4_state *state, fmode_t fmode)