forked from Minki/linux
NFSv4.1/flexfiles: Clean up ff_layout_write_done_cb/ff_layout_commit_done_cb
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
f95c03b2d5
commit
7cc8c5cde0
@ -1342,14 +1342,12 @@ static int ff_layout_write_done_cb(struct rpc_task *task,
|
||||
|
||||
switch (err) {
|
||||
case -NFS4ERR_RESET_TO_PNFS:
|
||||
pnfs_set_retry_layoutget(hdr->lseg->pls_layout);
|
||||
ff_layout_reset_write(hdr, true);
|
||||
return task->tk_status;
|
||||
case -NFS4ERR_RESET_TO_MDS:
|
||||
if (err == -NFS4ERR_RESET_TO_PNFS) {
|
||||
pnfs_set_retry_layoutget(hdr->lseg->pls_layout);
|
||||
ff_layout_reset_write(hdr, true);
|
||||
} else {
|
||||
pnfs_clear_retry_layoutget(hdr->lseg->pls_layout);
|
||||
ff_layout_reset_write(hdr, false);
|
||||
}
|
||||
pnfs_clear_retry_layoutget(hdr->lseg->pls_layout);
|
||||
ff_layout_reset_write(hdr, false);
|
||||
return task->tk_status;
|
||||
case -EAGAIN:
|
||||
rpc_restart_call_prepare(task);
|
||||
@ -1384,11 +1382,11 @@ static int ff_layout_commit_done_cb(struct rpc_task *task,
|
||||
|
||||
switch (err) {
|
||||
case -NFS4ERR_RESET_TO_PNFS:
|
||||
pnfs_set_retry_layoutget(data->lseg->pls_layout);
|
||||
pnfs_generic_prepare_to_resend_writes(data);
|
||||
return -EAGAIN;
|
||||
case -NFS4ERR_RESET_TO_MDS:
|
||||
if (err == -NFS4ERR_RESET_TO_PNFS)
|
||||
pnfs_set_retry_layoutget(data->lseg->pls_layout);
|
||||
else
|
||||
pnfs_clear_retry_layoutget(data->lseg->pls_layout);
|
||||
pnfs_clear_retry_layoutget(data->lseg->pls_layout);
|
||||
pnfs_generic_prepare_to_resend_writes(data);
|
||||
return -EAGAIN;
|
||||
case -EAGAIN:
|
||||
|
Loading…
Reference in New Issue
Block a user