From: Fam Zheng <famz@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 5/6] qmp: Add blockdev-mirror command
Date: Wed, 22 Jul 2015 09:42:46 +0800 [thread overview]
Message-ID: <20150722014246.GB18149@ad.nay.redhat.com> (raw)
In-Reply-To: <55AD14DA.7040004@redhat.com>
On Mon, 07/20 17:33, Max Reitz wrote:
> On 25.06.2015 05:22, Fam Zheng wrote:
> >This will start a mirror job from a named device to another named
> >device, its relation with drive-mirror is similar with blockdev-backup
> >to drive-backup.
> >
> >In blockdev-mirror, the target node should be prepared by blockdev-add,
> >which will be responsible for assigning a name to the new node, so
> >'node-name' in drive-mirror is dropped.
> >
> >Signed-off-by: Fam Zheng <famz@redhat.com>
> >---
> > blockdev.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> > qapi/block-core.json | 47 ++++++++++++++++++++++++++++++++++++++++
> > qmp-commands.hx | 48 +++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 156 insertions(+)
> >
> >diff --git a/blockdev.c b/blockdev.c
> >index de6383f..e0dba07 100644
> >--- a/blockdev.c
> >+++ b/blockdev.c
> >@@ -2932,6 +2932,10 @@ static void blockdev_mirror_common(BlockDriverState *bs,
> > if (bdrv_op_is_blocked(target, BLOCK_OP_TYPE_MIRROR_TARGET, errp)) {
> > return;
> > }
> >+ if (target->blk) {
> >+ error_setg(errp, "Cannot mirror to an attached block device");
> >+ return;
> >+ }
>
> 1) Why?
To match the limitation of drive-mirror. We don't yet have a block job that
writes to attached device yet (except for stream, but that's only copy on
read). I've no idea what that implies, and I don't know if there is even a use
case.
>
> 2) I think this should be noted in the QMP interface documentation. "the
> name of the device to mirror to" sounds like it is actually meant to be an
> attached block device.
I'll update the documentation.
Fam
next prev parent reply other threads:[~2015-07-22 1:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 3:22 [Qemu-devel] [PATCH v2 0/6] qmp: Add blockdev-mirror Fam Zheng
2015-06-25 3:22 ` [Qemu-devel] [PATCH v2 1/6] block: Add blocker on mirror target Fam Zheng
2015-07-20 15:10 ` Max Reitz
2015-06-25 3:22 ` [Qemu-devel] [PATCH v2 2/6] block: Rename BLOCK_OP_TYPE_MIRROR to BLOCK_OP_TYPE_MIRROR_SOURCE Fam Zheng
2015-06-25 3:22 ` [Qemu-devel] [PATCH v2 3/6] block: Extract blockdev part of qmp_drive_mirror Fam Zheng
2015-07-20 15:30 ` Max Reitz
2015-06-25 3:22 ` [Qemu-devel] [PATCH v2 4/6] block: Add check on mirror target Fam Zheng
2015-06-25 3:22 ` [Qemu-devel] [PATCH v2 5/6] qmp: Add blockdev-mirror command Fam Zheng
2015-07-02 13:12 ` Markus Armbruster
2015-07-20 15:33 ` Max Reitz
2015-07-22 1:42 ` Fam Zheng [this message]
2015-06-25 3:22 ` [Qemu-devel] [PATCH v2 6/6] iotests: Add test cases for blockdev-mirror Fam Zheng
2015-06-25 14:25 ` [Qemu-devel] [Qemu-block] [PATCH v2 0/6] qmp: Add blockdev-mirror Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150722014246.GB18149@ad.nay.redhat.com \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).