diff options
author | Olga Kornievskaia <kolga@netapp.com> | 2017-09-26 19:51:39 +0200 |
---|---|---|
committer | Olga Kornievskaia <olga.kornievskaia@gmail.com> | 2019-10-09 18:06:05 +0200 |
commit | 6b61c969d501ad5ae035d27b75fa6c7f2eb6a54a (patch) | |
tree | 0bf3c716f55fccb7dbe2059ae228b57ba4be2a05 /fs/nfs/nfs42proc.c | |
parent | NFS: for "inter" copy treat ESTALE as ENOTSUPP (diff) | |
download | linux-6b61c969d501ad5ae035d27b75fa6c7f2eb6a54a.tar.xz linux-6b61c969d501ad5ae035d27b75fa6c7f2eb6a54a.zip |
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>
Diffstat (limited to 'fs/nfs/nfs42proc.c')
-rw-r--r-- | fs/nfs/nfs42proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 6ed5a16dc511..50538b975aba 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -391,7 +391,8 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src, args.sync = true; dst_exception.retry = 1; continue; - } else if (err == -ESTALE && + } else if ((err == -ESTALE || + err == -NFS4ERR_OFFLOAD_DENIED) && !nfs42_files_from_same_server(src, dst)) { nfs42_do_offload_cancel_async(src, &args.src_stateid); err = -EOPNOTSUPP; |