Skip to content

Commit

Permalink
pnfs: retry after a bad stateid error from layoutget
Browse files Browse the repository at this point in the history
Currently we fall through to nfs4_async_handle_error when we get
a bad stateid error back from layoutget.  nfs4_async_handle_error
with a NULL state argument will never retry the operations but return
the error to higher layer, causing an avoiable fallback to MDS I/O.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Christoph Hellwig authored and Trond Myklebust committed Sep 10, 2014
1 parent 362f747 commit defb846
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -7577,11 +7577,16 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)
} else {
LIST_HEAD(head);

/*
* Mark the bad layout state as invalid, then retry
* with the current stateid.
*/
pnfs_mark_matching_lsegs_invalid(lo, &head, NULL);
spin_unlock(&inode->i_lock);
/* Mark the bad layout state as invalid, then
* retry using the open stateid. */
pnfs_free_lseg_list(&head);

task->tk_status = 0;
rpc_restart_call_prepare(task);
}
}
if (nfs4_async_handle_error(task, server, state) == -EAGAIN)
Expand Down

0 comments on commit defb846

Please sign in to comment.