On Thu, May 26, 2022 at 12:05:55PM +0100, Alberto Faria wrote: > On Thu, May 26, 2022 at 10:00 AM Stefan Hajnoczi <stefa...@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