Skip to content

Commit

Permalink
pnfs/flexfiles: do not mark delay-like status as DS failure
Browse files Browse the repository at this point in the history
We just need to delay and retry in these cases.

Signed-off-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Peng Tao authored and Trond Myklebust committed Dec 28, 2015
1 parent 7c1e6e5 commit c22eeb8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fs/nfs/flexfilelayout/flexfilelayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,14 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
}
}

switch (status) {
case NFS4ERR_DELAY:
case NFS4ERR_GRACE:
return;
default:
break;
}

mirror = FF_LAYOUT_COMP(lseg, idx);
err = ff_layout_track_ds_error(FF_LAYOUT_FROM_HDR(lseg->pls_layout),
mirror, offset, length, status, opnum,
Expand Down Expand Up @@ -1399,7 +1407,6 @@ static int ff_layout_write_done_cb(struct rpc_task *task,
ff_layout_reset_write(hdr, false);
return task->tk_status;
case -EAGAIN:
rpc_restart_call_prepare(task);
return -EAGAIN;
}

Expand Down

0 comments on commit c22eeb8

Please sign in to comment.