From: Kevin Wolf <kwolf@redhat.com>
To: Kashyap Chamarthy <kchamart@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, armbru@redhat.com,
mreitz@redhat.com
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v5 for-2.11] QAPI & interop: Clarify events emitted by 'block-job-cancel'
Date: Mon, 27 Nov 2017 12:53:07 +0100 [thread overview]
Message-ID: <20171127115307.GB4903@localhost.localdomain> (raw)
In-Reply-To: <20171121115253.14923-1-kchamart@redhat.com>
Am 21.11.2017 um 12:52 hat Kashyap Chamarthy geschrieben:
> When you cancel an in-progress 'mirror' job (or "active `block-commit`")
> with QMP `block-job-cancel`, it emits the event: BLOCK_JOB_CANCELLED.
> However, when `block-job-cancel` is issued *after* `drive-mirror` has
> indicated (via the event BLOCK_JOB_READY) that the source and
> destination have reached synchronization:
>
> [...] # Snip `drive-mirror` invocation & outputs
> {
> "execute":"block-job-cancel",
> "arguments":{
> "device":"virtio0"
> }
> }
>
> {"return": {}}
>
> It (`block-job-cancel`) will counterintuitively emit the event
> 'BLOCK_JOB_COMPLETED':
>
> {
> "timestamp":{
> "seconds":1510678024,
> "microseconds":526240
> },
> "event":"BLOCK_JOB_COMPLETED",
> "data":{
> "device":"virtio0",
> "len":41126400,
> "offset":41126400,
> "speed":0,
> "type":"mirror"
> }
> }
>
> But this is expected behaviour, where the _COMPLETED event indicates
> that synchronization has successfully ended (and the destination now has
> a point-in-time copy, which is at the time of cancel).
>
> So add a small note to this effect in 'block-core.json'. While at it,
> also update the "Live disk synchronization -- drive-mirror and
> blockdev-mirror" section in 'live-block-operations.rst'.
>
> (Thanks: Max Reitz for reminding me of this caveat on IRC.)
>
> Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> +(1) Issuing the command ``block-job-cancel`` (after it emits the event
> + ``BLOCK_JOB_COMPLETED``) will create a point-in-time (which is at
> + the time of *triggering* the cancel command) copy of the entire disk
> image chain (or only the top-most image, depending on the ``sync``
> - mode).
> + mode), contained in the target image [E]. One use case for this is
> + live storage migration.
As commented on v4, I dropped the last sentence here for now. Please
suggest an unambiguous wording if you'd prefer to keep it.
Thanks, applied to the block branch.
Kevin
next prev parent reply other threads:[~2017-11-27 11:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 11:52 [Qemu-devel] [PATCH v5 for-2.11] QAPI & interop: Clarify events emitted by 'block-job-cancel' Kashyap Chamarthy
2017-11-27 11:53 ` Kevin Wolf [this message]
2017-11-27 13:00 ` [Qemu-devel] [Qemu-block] " Kashyap Chamarthy
2017-11-27 14:00 ` Kevin Wolf
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=20171127115307.GB4903@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=kchamart@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).