Skip to content

Commit 4730515

Browse files
kofemannamschuma-ntap
authored andcommitted
nfs42: do not fail with EIO if ssc returns NFS4ERR_OFFLOAD_DENIED
The NFSv4.2 server even if supports intra-SSC might prefer that for a particular file a classic copy is performed. As returning ENOTSUPP will clear the SSC capability of the server by the client, server might return NFS4ERR_OFFLOAD_DENIED (well, spec talks about remote servers there). Update nfs42_proc_copy to handle NFS4ERR_OFFLOAD_DENIED as ENOTSUPP, but without clearing NFS_CAP_COPY bit. Signed-off-by: Tigran Mkrtchyan <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 5bab56f commit 4730515

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
@@ -460,7 +460,8 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
460460

461461
if (err >= 0)
462462
break;
463-
if (err == -ENOTSUPP &&
463+
if ((err == -ENOTSUPP ||
464+
err == -NFS4ERR_OFFLOAD_DENIED) &&
464465
nfs42_files_from_same_server(src, dst)) {
465466
err = -EOPNOTSUPP;
466467
break;

0 commit comments

Comments
 (0)