Skip to content

Commit

Permalink
NFSv4.2: fix handling of COPY ERR_OFFLOAD_NO_REQ
Browse files Browse the repository at this point in the history
[ Upstream commit 5690eed ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
olgakorn1 authored and gregkh committed Sep 13, 2023
1 parent fdbc963 commit 4030ace
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/nfs/nfs42proc.c
Expand Up @@ -470,8 +470,9 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src,
continue;
}
break;
} else if (err == -NFS4ERR_OFFLOAD_NO_REQS && !args.sync) {
args.sync = true;
} else if (err == -NFS4ERR_OFFLOAD_NO_REQS &&
args.sync != res.synchronous) {
args.sync = res.synchronous;
dst_exception.retry = 1;
continue;
} else if ((err == -ESTALE ||
Expand Down

0 comments on commit 4030ace

Please sign in to comment.