Return-Path: Received: from mx141.netapp.com ([216.240.21.12]:20627 "EHLO mx141.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384AbeBTQvy (ORCPT ); Tue, 20 Feb 2018 11:51:54 -0500 From: Olga Kornievskaia To: , CC: Subject: [PATCH v7 11/12] NFS handle COPY ERR_OFFLOAD_NO_REQS Date: Tue, 20 Feb 2018 11:42:23 -0500 Message-ID: <20180220164224.65366-12-kolga@netapp.com> In-Reply-To: <20180220164224.65366-1-kolga@netapp.com> References: <20180220164224.65366-1-kolga@netapp.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-nfs-owner@vger.kernel.org List-ID: 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 --- fs/nfs/nfs42proc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 2971eda..fbd1f8a 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -316,7 +316,11 @@ ssize_t nfs42_proc_copy(struct file *src, loff_t pos_src, if (err == -ENOTSUPP) { err = -EOPNOTSUPP; break; - } if (err == -EAGAIN) { + } else if (err == -EAGAIN) { + dst_exception.retry = 1; + continue; + } else if (err == -NFS4ERR_OFFLOAD_NO_REQS && !args.sync) { + args.sync = true; dst_exception.retry = 1; continue; } -- 1.8.3.1