From fd59b56add9509fc639b6dcc01efb314bf987777 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 13 Jun 2011 13:37:35 -0400 Subject: [PATCH] pnfs: fix for ERR_DELAY on CB_LAYOUTRECALL Signed-off-by: Casey Bodley --- daemon/pnfs_layout.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/pnfs_layout.c b/daemon/pnfs_layout.c index 8cd30de..05f89ab 100644 --- a/daemon/pnfs_layout.c +++ b/daemon/pnfs_layout.c @@ -811,7 +811,10 @@ static enum pnfs_status file_layout_recall( /* under an exclusive lock, flag the layout as recalled */ AcquireSRWLockExclusive(&state->lock); - if (recall->recall.type == PNFS_RETURN_FILE + if ((state->status & PNFS_LAYOUT_GRANTED) == 0) { + /* return NOMATCHINGLAYOUT if it wasn't actually granted */ + status = PNFSERR_NO_LAYOUT; + } else if (recall->recall.type == PNFS_RETURN_FILE && stateid_arg->seqid > state->stateid.seqid + 1) { /* the server has processed an outstanding LAYOUTGET or LAYOUTRETURN; * we must return ERR_DELAY until we get the response and update our