[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/17] blkreplay: Convert to byte-based I/O
From: |
Eric Blake |
Subject: |
Re: [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:
https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg05823.html
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/17] block: Convert common I/O path to BdrvChild, Kevin Wolf, 2016/06/21
- [Qemu-devel] [PATCH 02/17] blkreplay: Convert to byte-based I/O, Kevin Wolf, 2016/06/21
- [Qemu-devel] [PATCH 04/17] block: Convert bdrv_co_readv() to BdrvChild, Kevin Wolf, 2016/06/21
- [Qemu-devel] [PATCH 01/17] vvfat: Use BdrvChild for s->qcow, Kevin Wolf, 2016/06/21
- [Qemu-devel] [PATCH 03/17] vhdx: Some more BlockBackend use in vhdx_create(), Kevin Wolf, 2016/06/21
- [Qemu-devel] [PATCH 08/17] block: Convert bdrv_co_do_readv/writev to BdrvChild, Kevin Wolf, 2016/06/21
- [Qemu-devel] [PATCH 05/17] block: Convert bdrv_co_writev() to BdrvChild, Kevin Wolf, 2016/06/21