[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!
signature.asc
Description: PGP signature
- [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper, (continued)
- [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper, Alberto Faria, 2022/05/19
- Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper, Stefan Hajnoczi, 2022/05/26
- Re: [PATCH v3 07/10] block: Implement bdrv_{pread, pwrite, pwrite_zeroes}() using generated_co_wrapper, Alberto Faria, 2022/05/26
- Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper, Eric Blake, 2022/05/27
- Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper, Stefan Hajnoczi, 2022/05/30
- Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper, Stefan Hajnoczi, 2022/05/30
- Re: [PATCH v3 07/10] block: Implement bdrv_{pread,pwrite,pwrite_zeroes}() using generated_co_wrapper, Stefan Hajnoczi, 2022/05/30
[PATCH v3 03/10] block: Make bdrv_{pread, pwrite}() return 0 on success, Alberto Faria, 2022/05/19
[PATCH v3 09/10] block: Use bdrv_co_pwrite_sync() when caller is coroutine_fn, Alberto Faria, 2022/05/19
[PATCH v3 08/10] block: Add bdrv_co_pwrite_sync(), Alberto Faria, 2022/05/19
[PATCH v3 10/10] block/qcow2: Use bdrv_pwrite_sync() in qcow2_mark_dirty(), Alberto Faria, 2022/05/19
[PATCH v3 04/10] crypto: Make block callbacks return 0 on success, Alberto Faria, 2022/05/19