qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 03/10] block: Make bdrv_{pread,pwrite}() return 0 on succe


From: Stefan Hajnoczi
Subject: Re: [PATCH v3 03/10] block: Make bdrv_{pread,pwrite}() return 0 on success
Date: Thu, 26 May 2022 09:50:18 +0100

On Thu, May 19, 2022 at 03:48:33PM +0100, Alberto Faria wrote:
> They currently return the value of their 'bytes' parameter on success.
> 
> Make them return 0 instead, for consistency with other I/O functions and
> in preparation to implement them using generated_co_wrapper. This also
> makes it clear that short reads/writes are not possible.
> 
> The few callers that rely on the previous behavior are adjusted
> accordingly by hand.
> 
> Signed-off-by: Alberto Faria <afaria@redhat.com>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  block/cloop.c                    |  2 +-
>  block/crypto.c                   |  4 ++--

Ah, I see you did the block/crypto.c read_func/write_func conversion in
the next patch. Great!

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]