pnfs/flexfiles: do not mark delay-like status as DS failure
authorPeng Tao <tao.peng@primarydata.com>
Mon, 7 Dec 2015 22:31:38 +0000 (17:31 -0500)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 28 Dec 2015 19:32:39 +0000 (14:32 -0500)
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>
fs/nfs/flexfilelayout/flexfilelayout.c

index 57e4010e3cdebe9570cb4d5cdab6164599c18281..b392156e67432c8982ae52c6e4f0622ce6aec92a 100644 (file)
@@ -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,
@@ -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;
        }