Commit 7c1e6e58 authored by Peng Tao's avatar Peng Tao Committed by Trond Myklebust

NFS41: map NFS4ERR_LAYOUTUNAVAILABLE to ENODATA

Instead of mapping it to EIO that is a fatal error and
fails application. We'll go inband after getting
NFS4ERR_LAYOUTUNAVAILABLE.
Signed-off-by: default avatarPeng Tao <tao.peng@primarydata.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent d6c843b9
...@@ -7795,6 +7795,15 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata) ...@@ -7795,6 +7795,15 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)
switch (task->tk_status) { switch (task->tk_status) {
case 0: case 0:
goto out; goto out;
/*
* NFS4ERR_LAYOUTUNAVAILABLE means we are not supposed to use pnfs
* on the file. set tk_status to -ENODATA to tell upper layer to
* retry go inband.
*/
case -NFS4ERR_LAYOUTUNAVAILABLE:
task->tk_status = -ENODATA;
goto out;
/* /*
* NFS4ERR_BADLAYOUT means the MDS cannot return a layout of * NFS4ERR_BADLAYOUT means the MDS cannot return a layout of
* length lgp->args.minlength != 0 (see RFC5661 section 18.43.3). * length lgp->args.minlength != 0 (see RFC5661 section 18.43.3).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment