Skip to content

Commit 6b61c96

Browse files
olgakorn1Olga Kornievskaia
authored andcommitted
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 <[email protected]>
1 parent 7e35019 commit 6b61c96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/nfs/nfs42proc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
391391
args.sync = true;
392392
dst_exception.retry = 1;
393393
continue;
394-
} else if (err == -ESTALE &&
394+
} else if ((err == -ESTALE ||
395+
err == -NFS4ERR_OFFLOAD_DENIED) &&
395396
!nfs42_files_from_same_server(src, dst)) {
396397
nfs42_do_offload_cancel_async(src, &args.src_stateid);
397398
err = -EOPNOTSUPP;

0 commit comments

Comments
 (0)