[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
- Re: [PATCH v3 02/10] block: Change bdrv_{pread, pwrite, pwrite_sync}() param order, (continued)
- [PATCH v3 01/10] block: Add a 'flags' param to bdrv_{pread, pwrite, pwrite_sync}(), Alberto Faria, 2022/05/19
- [PATCH v3 05/10] block: Make bdrv_co_pwrite() take a const buffer, Alberto Faria, 2022/05/19
- [PATCH v3 03/10] block: Make bdrv_{pread, pwrite}() return 0 on success, Alberto Faria, 2022/05/19
- [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 06/10] block: Make 'bytes' param of bdrv_co_{pread, pwrite, preadv, pwritev}() an int64_t, Alberto Faria, 2022/05/19
- Re: [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() an int64_t, Eric Blake, 2022/05/24
- Re: [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() an int64_t, Stefan Hajnoczi, 2022/05/26