diff mbox

[RFC,v3,14/42] NFS if we got partial copy ignore errors

Message ID 20170711164416.1982-15-kolga@netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Olga Kornievskaia July 11, 2017, 4:43 p.m. UTC
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
---
 fs/nfs/nfs42proc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Anna Schumaker July 12, 2017, 2:52 p.m. UTC | #1
Hi Olga,

On 07/11/2017 12:43 PM, Olga Kornievskaia wrote:
> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
> ---
>  fs/nfs/nfs42proc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
> index dba2b62..dfd43bc 100644
> --- a/fs/nfs/nfs42proc.c
> +++ b/fs/nfs/nfs42proc.c
> @@ -179,7 +179,8 @@ static int handle_async_copy(struct nfs42_copy_res *res,
>  out:
>  	*ret_count = copy->count;
>  	memcpy(&res->write_res.verifier, &copy->verf, sizeof(copy->verf));
> -	status = -copy->error;
> +	if (copy->count <= 0)
> +		status = -copy->error;

This is a pretty small change.  Can you squash this patch into patch 8
("NFS add support for asynchronous COPY") that way the code is correct from
the time it's added?

Thanks,
Anna

>  
>  	kfree(copy);
>  	return status;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Olga Kornievskaia July 12, 2017, 5:19 p.m. UTC | #2
> On Jul 12, 2017, at 10:52 AM, Anna Schumaker <schumaker.anna@gmail.com> wrote:
> 
> Hi Olga,
> 
> On 07/11/2017 12:43 PM, Olga Kornievskaia wrote:
>> Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
>> ---
>> fs/nfs/nfs42proc.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
>> index dba2b62..dfd43bc 100644
>> --- a/fs/nfs/nfs42proc.c
>> +++ b/fs/nfs/nfs42proc.c
>> @@ -179,7 +179,8 @@ static int handle_async_copy(struct nfs42_copy_res *res,
>> out:
>> 	*ret_count = copy->count;
>> 	memcpy(&res->write_res.verifier, &copy->verf, sizeof(copy->verf));
>> -	status = -copy->error;
>> +	if (copy->count <= 0)
>> +		status = -copy->error;
> 
> This is a pretty small change.  Can you squash this patch into patch 8
> ("NFS add support for asynchronous COPY") that way the code is correct from
> the time it's added?

Ok.

> 
> Thanks,
> Anna
> 
>> 
>> 	kfree(copy);
>> 	return status;
>> 

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index dba2b62..dfd43bc 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -179,7 +179,8 @@  static int handle_async_copy(struct nfs42_copy_res *res,
 out:
 	*ret_count = copy->count;
 	memcpy(&res->write_res.verifier, &copy->verf, sizeof(copy->verf));
-	status = -copy->error;
+	if (copy->count <= 0)
+		status = -copy->error;
 
 	kfree(copy);
 	return status;