From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>,
Ori Mamluk <omamluk@zerto.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] Block job commands in QEMU 1.2 [v2, including support for replication]
Date: Fri, 25 May 2012 09:02:29 -0600 [thread overview]
Message-ID: <4FBF9F05.8000605@redhat.com> (raw)
In-Reply-To: <4FBF4775.5020505@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2893 bytes --]
On 05/25/2012 02:48 AM, Paolo Bonzini wrote:
>>> * block-job-complete: force completion of mirroring and switching of the
>>> device to the target, not related to the rest of the proposal.
>>> Synchronously opens backing files if needed, asynchronously completes
>>> the job.
>>
>> Can this be made part of a 'transaction'? Likewise, can
>> 'block-job-cancel' be made part of a 'transaction'?
>
> Both of them are asynchronous so they would not create an atomic
> snapshot. We could add it later, in the meanwhile you can wrap with
> fsfreeze/fsthaw.
It doesn't have to be right away, I just want to make sure that we
aren't excluding it from a possible future extension, because it _does_
sound useful.
>
>> But now that you are adding the possibility of mirroring reverting
>> to copying, there is a race where I can probe and see that we are
>> in mirroring, then issue a 'block-job-cancel' to affect a copy operation,
>> but in the meantime things reverted, and the cancel ends up leaving me
>> with an incomplete copy.
>
> Hmm, that's right. But then this can only happen if you have an error
> in the target. I can make block-job-cancel _not_ resume a paused job.
> Would that satisfy your needs?
I'm not sure I follow what you are asking. My scenario is:
call 'drive-mirror' to start a job
'block-job-complete' fails because job is not ready, but the job is not
affected
wait for the event telling me we are in mirroring phase
start issuing my call to 'block-job-complete' to pivot
something happens where we are no longer mirroring
'block-job-complete' fails because we are not mirroring - good
call 'drive-mirror' to start a job
calling 'block-job-cancel' would abort the job, which is not what I want
wait for the event telling me we are in mirroring phase
start issuing my call to 'block-job-cancel' to cleanly leave the copy behind
something happens where we are no longer mirroring
'block-job-cancel' completes, but did not leave a complete mirror - bad
On the other hand, if I'm _not_ trying to make a clean copy, then I want
'block-job-cancel' to work as fast as possible, no matter what.
I'm not sure why having block-job-cancel resume or not resume a job
would make a difference. What I really am asking for here is a way to
have some command (perhaps 'block-job-complete' but with an optional
flag set to a non-default value) that says I want to complete the job as
a clean copy, but revert back to the source rather than pivot to the
destination, and to cleanly fail with the job still around for
additional actions if I cannot get a clean copy at the current moment,
in the same way that the default 'block-job-complete' cleanly fails but
does not kill the job if I'm not mirroring yet.
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
next prev parent reply other threads:[~2012-05-25 15:03 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-18 17:08 [Qemu-devel] Proposal for extensions of block job commands in QEMU 1.2 Paolo Bonzini
2012-05-21 9:29 ` Kevin Wolf
2012-05-21 10:02 ` Paolo Bonzini
2012-05-21 10:32 ` Kevin Wolf
2012-05-21 11:02 ` Paolo Bonzini
2012-05-21 13:07 ` Kevin Wolf
2012-05-21 15:18 ` Paolo Bonzini
2012-05-21 13:13 ` Eric Blake
2012-05-21 12:20 ` Stefan Hajnoczi
2012-05-21 13:59 ` Luiz Capitulino
2012-05-21 14:09 ` Kevin Wolf
2012-05-21 14:16 ` Anthony Liguori
2012-05-21 14:17 ` Luiz Capitulino
2012-05-21 14:10 ` Anthony Liguori
2012-05-21 14:16 ` Luiz Capitulino
2012-05-21 14:19 ` Anthony Liguori
2012-05-21 14:26 ` Paolo Bonzini
2012-05-21 14:40 ` Anthony Liguori
2012-05-21 14:47 ` Paolo Bonzini
2012-05-21 15:44 ` Anthony Liguori
2012-05-21 15:55 ` Paolo Bonzini
2012-05-21 14:17 ` Kevin Wolf
2012-05-21 14:39 ` Paolo Bonzini
2012-05-24 13:41 ` [Qemu-devel] Block job commands in QEMU 1.2 [v2, including support for replication] Paolo Bonzini
2012-05-24 14:00 ` Ori Mamluk
2012-05-24 14:19 ` Paolo Bonzini
2012-05-24 15:32 ` Dor Laor
2012-05-25 8:59 ` Paolo Bonzini
2012-05-24 16:57 ` Eric Blake
2012-05-25 8:48 ` Paolo Bonzini
2012-05-25 15:02 ` Eric Blake [this message]
2012-05-25 8:28 ` Stefan Hajnoczi
2012-05-25 8:42 ` Kevin Wolf
2012-05-25 9:43 ` Stefan Hajnoczi
2012-05-25 11:17 ` Paolo Bonzini
2012-05-25 12:09 ` Stefan Hajnoczi
2012-05-25 13:25 ` Paolo Bonzini
2012-05-25 16:57 ` Luiz Capitulino
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=4FBF9F05.8000605@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=omamluk@zerto.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@linux.vnet.ibm.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).