[PATCH 5/5] 9p: Use length of data written to the server in preference to error

Dominique Martinet asmadeus at codewreck.org
Thu Jan 4 06:46:38 AEDT 2024


David Howells wrote on Wed, Jan 03, 2024 at 02:59:29PM +0000:
> In v9fs_upload_to_server(), we pass the error to netfslib to terminate the
> subreq rather than the amount of data written - even if we did actually
> write something.
> 
> Further, we assume that the write is always entirely done if successful -
> but it might have been partially complete - as returned by
> p9_client_write(), but we ignore that.
> 
> Fix this by indicating the amount written by preference and only returning
> the error if we didn't write anything.
> 
> (We might want to return both in future if both are available as this
> might be useful as to whether we retry or not.)
> 
> Suggested-by: Dominique Martinet <asmadeus at codewreck.org>

Thanks,

Acked-by: Dominique Martinet <asmadeus at codewreck.org>

-- 
Dominique Martinet | Asmadeus


More information about the Linux-erofs mailing list