NFS: COPY handle ERR_OFFLOAD_DENIED
If server sends ERR_OFFLOAD_DENIED error, the client must fall back on doing copy the normal way. Return ENOTSUPP to the vfs and fallback to regular copy. Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
This commit is contained in:
parent
7e350197a1
commit
6b61c969d5
|
@ -391,7 +391,8 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
|
||||||
args.sync = true;
|
args.sync = true;
|
||||||
dst_exception.retry = 1;
|
dst_exception.retry = 1;
|
||||||
continue;
|
continue;
|
||||||
} else if (err == -ESTALE &&
|
} else if ((err == -ESTALE ||
|
||||||
|
err == -NFS4ERR_OFFLOAD_DENIED) &&
|
||||||
!nfs42_files_from_same_server(src, dst)) {
|
!nfs42_files_from_same_server(src, dst)) {
|
||||||
nfs42_do_offload_cancel_async(src, &args.src_stateid);
|
nfs42_do_offload_cancel_async(src, &args.src_stateid);
|
||||||
err = -EOPNOTSUPP;
|
err = -EOPNOTSUPP;
|
||||||
|
|
Loading…
Reference in a new issue