qemu-block
[Top][All Lists]
Advanced

[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




reply via email to

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