[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 07/14] mirror: Use BlockBackend for I/O
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH 07/14] mirror: Use BlockBackend for I/O |
Date: |
Fri, 13 May 2016 16:38:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 04.05.2016 11:39, Kevin Wolf wrote:
> This changes the mirror block job to use the job's BlockBackend for
> performing its I/O. job->bs isn't used by the mirroring code any more
> afterwards.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/mirror.c | 75
> +++++++++++++++++++++++++++++++---------------------------
> blockdev.c | 4 +---
> 2 files changed, 41 insertions(+), 38 deletions(-)
>
> diff --git a/block/mirror.c b/block/mirror.c
> index 23aa10e..dc66340 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -35,7 +35,7 @@ typedef struct MirrorBuffer {
> typedef struct MirrorBlockJob {
> BlockJob common;
> RateLimit limit;
> - BlockDriverState *target;
> + BlockBackend *target;
> BlockDriverState *base;
> /* The name of the graph node to replace */
> char *replaces;
> @@ -156,8 +156,8 @@ static void mirror_read_complete(void *opaque, int ret)
> mirror_iteration_done(op, ret);
> return;
> }
> - bdrv_aio_writev(s->target, op->sector_num, &op->qiov, op->nb_sectors,
> - mirror_write_complete, op);
> + blk_aio_writev(s->target, op->sector_num, &op->qiov, op->nb_sectors,
> + mirror_write_complete, op);
Or maybe the rest doesn't look so good after all. We don't have this
function anymore, I'm afraid.
Max
> }
>
> static inline void mirror_clip_sectors(MirrorBlockJob *s,
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH 05/14] stream: Use BlockBackend for I/O, (continued)
- [Qemu-block] [PATCH 06/14] mirror: Allow target that already has a BlockBackend, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 08/14] backup: Don't leak BackupBlockJob in error path, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 01/14] block: keep a list of block jobs, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 07/14] mirror: Use BlockBackend for I/O, Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 11/14] block: Add blk_co_readv/writev(), Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 02/14] block: Cancel jobs first in bdrv_close_all(), Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 10/14] backup: Remove bs parameter from backup_do_cow(), Kevin Wolf, 2016/05/04
- [Qemu-block] [PATCH 13/14] commit: Use BlockBackend for I/O, Kevin Wolf, 2016/05/04