All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, Eric Blake <eblake@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org, jtc@redhat.com,
	Markus Armbruster <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Jeff Cody <jcody@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 05/15] block/mirror: don't install backing chain on abort
Date: Wed, 5 Sep 2018 08:59:07 -0400	[thread overview]
Message-ID: <9f910b98-89f8-9b9f-a9dd-3a4ac44833f0@redhat.com> (raw)
In-Reply-To: <20180905095431.GA4489@localhost.localdomain>



On 09/05/2018 05:54 AM, Kevin Wolf wrote:
> Am 04.09.2018 um 21:30 hat Eric Blake geschrieben:
>> On 09/04/2018 02:15 PM, John Snow wrote:
>>
>>>
>>> post-script: I really, really hate the "fake cancel" we've implemented
>>> for mirror. It makes the job logic so much worse.
>>
>> Mirror really does have a tri-state way to end the job (and accessible only
>> after the job has moved into the sync state):
>>
>> cancel (gracefully end the job by detaching the mirror, so that the original
>> volume remains active - your "fake cancel")
>> complete (gracefully end the job by pivoting to the mirror, so that the
>> original volume is now the backup)
>> cancel --force (end the job now, even though it means you did not actually
>> create a mirrored copy) - only useful since commit b76e4458 (2.12)
>>
>> The first two are conceptually similar - the job succeeds, and one of the
>> two files used in the mirroring is now the state of the other at the time
>> the job concluded.
>>
>> Back-compat says we can't really change the block-job terminology without an
>> adequate deprecation cycle (and I don't know if libvirt has even been taught
>> about cancel --force yet); but for the newer 'job' functionality (which we
>> tried to shoehorn existing block jobs into), it does seem like it would be
>> nicer to have 'cancel' mean what blockjob cancel --force implies, and
>> instead focus on teaching 'complete' to have a way to select which of the
>> two completion modes are desired (complete by return to original, or
>> complete by pivot to mirror).  It might even be nice to have a way to
>> specify which completion mode to default to at job creation time, and/or to
>> change that default as the job is running (which also implies being able to
>> query which completion mode is currently tied to the job, if you can
>> complete without requesting either of the two modes explicitly).
> 
> I think it's better to select the completion mode in the job-complete
> command than having to specify it from the start.
> 
> Once we have support multiple completion modes (even just internally),
> nothing stops us from moving the "fake cancel" logic to the QMP layer
> (i.e. the drive-mirror/blockdev-mirror implementations) and get rid of
> it in the actual job.
> 

Oh! I hadn't considered that specific tactic before. That's a very good
idea!

Thanks!

--js

  reply	other threads:[~2018-09-05 12:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 22:28 [Qemu-devel] [PATCH v3 00/15] jobs: Job Exit Refactoring Pt 2 John Snow
2018-08-31 22:28 ` [Qemu-devel] [PATCH v3 01/15] block/commit: add block job creation flags John Snow
2018-09-01  3:17   ` Jeff Cody
2018-08-31 22:28 ` [Qemu-devel] [PATCH v3 02/15] block/mirror: " John Snow
2018-09-01  3:31   ` Jeff Cody
2018-08-31 22:28 ` [Qemu-devel] [PATCH v3 03/15] block/stream: " John Snow
2018-08-31 22:34   ` Eric Blake
2018-09-01  3:33   ` Jeff Cody
2018-08-31 22:28 ` [Qemu-devel] [PATCH v3 04/15] block/commit: refactor commit to use job callbacks John Snow
2018-08-31 22:28 ` [Qemu-devel] [PATCH v3 05/15] block/mirror: don't install backing chain on abort John Snow
2018-09-03  9:24   ` Max Reitz
2018-09-04 19:15     ` John Snow
2018-09-04 19:30       ` Eric Blake
2018-09-04 20:10         ` John Snow
2018-09-05  9:54         ` Kevin Wolf
2018-09-05 12:59           ` John Snow [this message]
2018-08-31 22:28 ` [Qemu-devel] [PATCH v3 06/15] block/mirror: conservative mirror_exit refactor John Snow
2018-09-03  9:32   ` Max Reitz
2018-09-04 16:17     ` John Snow
2018-08-31 22:28 ` [Qemu-devel] [PATCH v3 07/15] block/commit: refactor stream to use job callbacks John Snow
2018-09-03  9:33   ` Max Reitz
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 08/15] tests/blockjob: replace Blockjob with Job John Snow
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 09/15] tests/test-blockjob: remove exit callback John Snow
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 10/15] tests/test-blockjob-txn: move .exit to .clean John Snow
2018-09-03  9:41   ` Max Reitz
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 11/15] jobs: remove .exit callback John Snow
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 12/15] qapi/block-commit: expose new job properties John Snow
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 13/15] qapi/block-mirror: " John Snow
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 14/15] qapi/block-stream: " John Snow
2018-08-31 22:29 ` [Qemu-devel] [PATCH v3 15/15] block/backup: qapi documentation fixup John Snow

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=9f910b98-89f8-9b9f-a9dd-3a4ac44833f0@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jtc@redhat.com \
    --cc=kwolf@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.