Skip to content

Commit 539f57b

Browse files
olgakorn1amschuma-ntap
authored andcommitted
NFS handle COPY ERR_OFFLOAD_NO_REQS
If client sent async COPY and server replied with ERR_OFFLOAD_NO_REQS, client should retry with a synchronous copy. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent c975c20 commit 539f57b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/nfs/nfs42proc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,11 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
316316
if (err == -ENOTSUPP) {
317317
err = -EOPNOTSUPP;
318318
break;
319-
} if (err == -EAGAIN) {
319+
} else if (err == -EAGAIN) {
320+
dst_exception.retry = 1;
321+
continue;
322+
} else if (err == -NFS4ERR_OFFLOAD_NO_REQS && !args.sync) {
323+
args.sync = true;
320324
dst_exception.retry = 1;
321325
continue;
322326
}

0 commit comments

Comments
 (0)