Skip to content

Commit 5690eed

Browse files
olgakorn1amschuma-ntap
authored andcommitted
NFSv4.2: fix handling of COPY ERR_OFFLOAD_NO_REQ
If the client sent a synchronous copy and the server replied with ERR_OFFLOAD_NO_REQ indicating that it wants an asynchronous copy instead, the client should retry with asynchronous copy. Fixes: 539f57b ("NFS handle COPY ERR_OFFLOAD_NO_REQS") Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent f67b55b commit 5690eed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/nfs/nfs42proc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,9 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
471471
continue;
472472
}
473473
break;
474-
} else if (err == -NFS4ERR_OFFLOAD_NO_REQS && !args.sync) {
475-
args.sync = true;
474+
} else if (err == -NFS4ERR_OFFLOAD_NO_REQS &&
475+
args.sync != res.synchronous) {
476+
args.sync = res.synchronous;
476477
dst_exception.retry = 1;
477478
continue;
478479
} else if ((err == -ESTALE ||

0 commit comments

Comments
 (0)