[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,
From: |
Eric Blake |
Subject: |
Re: [PATCH v3 06/10] block: Make 'bytes' param of bdrv_co_{pread,pwrite,preadv,pwritev}() an int64_t |
Date: |
Fri, 27 May 2022 09:23:10 -0500 |
User-agent: |
NeoMutt/20220429-77-e284d5 |
On Thu, May 26, 2022 at 12:05:55PM +0100, Alberto Faria wrote:
> On Thu, May 26, 2022 at 10:00 AM Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > Maybe let the existing bdrv_check_request32() call in bdrv_co_preadv()
in bdrv_co_preadv_part()
> > check this? It returns -EIO if bytes is too large.
>
> I'd be okay with that. Does this warrant changing blk_co_pread() and
> blk_co_pwrite() as well?
>
> Eric, what do you think?
>
Yes, reusing the existing function covers more cases with common error
messages. All that matters is that we check for overflow before
trying to populate the qiov.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- Re: [PATCH v3 03/10] block: Make bdrv_{pread,pwrite}() return 0 on success, (continued)
- [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
[PATCH v3 08/10] block: Add bdrv_co_pwrite_sync(), 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 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