Received: from eggs.gnu.org ([2001:4830:134:3::10]:60787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7xko-0001Y6-KP for qemu-devel@nongnu.org; Wed, 24 Jun 2015 23:23:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7xkn-0000vC-K6 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 23:23:06 -0400 From: Fam Zheng Date: Thu, 25 Jun 2015 11:22:44 +0800 Message-Id: <1435202570-12360-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/6] qmp: Add blockdev-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , Markus Armbruster , mreitz@redhat.com, Stefan Hajnoczi , pbonzini@redhat.com v2: 01: Move bdrv_op_block_all down. [Max] 02, 04: Add Max's rev-by. 03: Check has_mode and fix "return;". [Max] 05: Check target->blk. Drop superfluous whitespace. [Max] 06: Drop superfluous whitespace hunk and add Max's rev-by. [Max] This is the counterpart of blockdev-backup. The biggest value of this command is to allow full flexibility on target image open options, via blockdev-add. For example this could help solve the target provisioning issue in: http://lists.gnu.org/archive/html/qemu-devel/2015-06/msg02139.html Because mirror job uses bdrv_swap, this series depends on Max's BlockBackend series: [PATCH v3 00/38] blockdev: BlockBackend and media http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg01109.html which makes it possible for blockdev-add to insert a BDS without BB (by omitting "id=" while only specifying "node-name="). Fam Zheng (6): block: Add blocker on mirror target block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE block: Extract blockdev part of qmp_drive_mirror block: Add check on mirror target qmp: Add blockdev-mirror command iotests: Add test cases for blockdev-mirror block/mirror.c | 2 + blockdev.c | 175 ++++++++++++++++++++++++++++++---------- hw/block/dataplane/virtio-blk.c | 2 +- include/block/block.h | 3 +- qapi/block-core.json | 47 +++++++++++ qmp-commands.hx | 48 +++++++++++ tests/qemu-iotests/041 | 99 ++++++++++++++++++----- tests/qemu-iotests/041.out | 4 +- 8 files changed, 314 insertions(+), 66 deletions(-) -- 2.4.3