[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] [PATCH 02/17] blkreplay: Convert to byte-b

From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 02/17] blkreplay: Convert to byte-based I/O
Date: Wed, 22 Jun 2016 11:15:05 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 06/21/2016 03:21 AM, Kevin Wolf wrote:
> The blkreplay driver only forwards the requests it gets, so converting
> it to byte granularity is trivial.
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
>  block/blkreplay.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)

> -static int coroutine_fn blkreplay_co_writev(BlockDriverState *bs,
> -    int64_t sector_num, int nb_sectors, QEMUIOVector *qiov)
> +static int coroutine_fn blkreplay_co_pwritev(BlockDriverState *bs,
> +    uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags)
>  {
>      uint64_t reqid = request_id++;
> -    int ret = bdrv_co_writev(bs->file->bs, sector_num, nb_sectors, qiov);
> +    int ret = bdrv_co_pwritev(bs->file->bs, offset, bytes, qiov, flags);

This would pass flags through, but fails to set .supported_write_flags,
so the caller will always pass flags=0. I think you want to set
.supported_write_flags during open; but see my recent patch about the
raw driver only setting flags according to the underlying device:


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]