From: Fam Zheng Date: Thu, 24 Dec 2015 04:45:02 +0000 (+0800) Subject: block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE X-Git-Tag: v2.6.0-rc0~239^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05e4d14bf308641c0c2888a6700f080fe40a074a;p=thirdparty%2Fqemu.git block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE It's necessary to distinguish source and target before we can add blockdev-mirror, because we would want a concrete type of operation to check on target bs before starting. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1450932306-13717-2-git-send-email-famz@redhat.com Signed-off-by: Max Reitz --- diff --git a/blockdev.c b/blockdev.c index 64dbfeb15bd..bd6f68e1599 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3368,7 +3368,7 @@ void qmp_drive_mirror(const char *device, const char *target, format = mode == NEW_IMAGE_MODE_EXISTING ? NULL : bs->drv->format_name; } - if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_MIRROR, errp)) { + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_MIRROR_SOURCE, errp)) { goto out; } diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index c57f293ccd2..a2529b2242b 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/dataplane/virtio-blk.c @@ -195,7 +195,7 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *conf, blk_op_unblock(conf->conf.blk, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT, s->blocker); blk_op_unblock(conf->conf.blk, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE, s->blocker); - blk_op_unblock(conf->conf.blk, BLOCK_OP_TYPE_MIRROR, s->blocker); + blk_op_unblock(conf->conf.blk, BLOCK_OP_TYPE_MIRROR_SOURCE, s->blocker); blk_op_unblock(conf->conf.blk, BLOCK_OP_TYPE_STREAM, s->blocker); blk_op_unblock(conf->conf.blk, BLOCK_OP_TYPE_REPLACE, s->blocker); diff --git a/include/block/block.h b/include/block/block.h index db8e0960042..8ea12fa2221 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -169,7 +169,7 @@ typedef enum BlockOpType { BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE, - BLOCK_OP_TYPE_MIRROR, + BLOCK_OP_TYPE_MIRROR_SOURCE, BLOCK_OP_TYPE_RESIZE, BLOCK_OP_TYPE_STREAM, BLOCK_OP_TYPE_REPLACE,