qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 02/17] block: Introduce bdrv_driver_pwritev()


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 02/17] block: Introduce bdrv_driver_pwritev()
Date: Sat, 30 Apr 2016 15:54:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 04/28/2016 07:16 AM, Kevin Wolf wrote:
> This is a function that simply calls into the block driver for doing a
> write, providing the byte granularity interface we want to eventually
> have everywhere, and using whatever interface that driver supports.
> 
> This one is a bit more interesting that the version for reads: It adds
> support for .bdrv_co_writev_flags() everywhere, so that drivers
> implementing this function can drop .bdrv_co_writev() now.
> 
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---

> @@ -1155,7 +1186,8 @@ static int coroutine_fn 
> bdrv_co_do_write_zeroes(BlockDriverState *bs,
>              }
>              qemu_iovec_init_external(&qiov, &iov, 1);
>  
> -            ret = drv->bdrv_co_writev(bs, sector_num, num, &qiov);
> +            ret = bdrv_driver_pwritev(bs, sector_num * BDRV_SECTOR_SIZE,
> +                                      num * BDRV_SECTOR_SIZE, &qiov, 0);

My review missed a latent bug here (pre-patch this should have been
using bdrv_co_writev_flags(..., flags & ~BDRV_REQ_ZERO_WRITE) so as to
keep BDRV_REQ_FUA semantics working), so as penance I've sent a patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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