From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: vsementsov@virtuozzo.com, famz@redhat.com, armbru@redhat.com,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v10 00/14] block: incremental backup transactions using BlockJobTxn
Date: Mon, 2 Nov 2015 16:06:08 -0500 [thread overview]
Message-ID: <5637D040.3000900@redhat.com> (raw)
In-Reply-To: <1445644612-12702-1-git-send-email-jsnow@redhat.com>
Ping!
To clarify, I *do* intend this series to be for-2.5, and I think it does
qualify as such.
If this *doesn't* go in, we have to revise our documentation just a
pinch to undo some of Kashyap's changes that have already been merged in.
Patches 5, 10, 11 and 12 are awaiting review.
--js
On 10/23/2015 07:56 PM, John Snow wrote:
> Welcome to V10!
>
> Where'd 8 and 9 go? Private off-list missives from Fam.
> Now you, I, and everyone on qemu-devel are staring at V10.
>
> What's new in V10?
>
> I replaced the per-action "transactional-cancel" parameter with
> a per-transaction paremeter named "err-cancel" which is implemented
> as an enum in case we want to add new behaviors in the future, such
> as a "jobs only" cancel mode.
>
> For now, it's "all" or "none", and if you use it with actions that
> do not support the latent transactional cancel, you will receive
> an error for your troubles.
>
> This version primarily changed patches 10,11 and replaced it with
> patches 10-12 that are cut a little differently.
>
> This is based on top of the work by Stefan Hajnoczi and Fam Zheng.
>
> Recap: motivation for block job transactions
> --------------------------------------------
> If an incremental backup block job fails then we reclaim the bitmap so
> the job can be retried. The problem comes when multiple jobs are started as
> part of a qmp 'transaction' command. We need to group these jobs in a
> transaction so that either all jobs complete successfully or all bitmaps are
> reclaimed.
>
> Without transactions, there is a case where some jobs complete successfully and
> throw away their bitmaps, making it impossible to retry the backup by rerunning
> the command if one of the jobs fails.
>
> How does this implementation work?
> ----------------------------------
> These patches add a BlockJobTxn object with the following API:
>
> txn = block_job_txn_new();
> block_job_txn_add_job(txn, job1);
> block_job_txn_add_job(txn, job2);
>
> The jobs either both complete successfully or they both fail/cancel. If the
> user cancels job1 then job2 will also be cancelled and vice versa.
>
> Jobs objects stay alive waiting for other jobs to complete, even if the
> coroutines have returned. They can be cancelled by the user during this time.
> Job blockers are still in effect and no other block job can run on this device
> in the meantime (since QEMU currently only allows 1 job per device). This is
> the main drawback to this approach but reasonable since you probably don't want
> to run other jobs/operations until you're sure the backup was successful (you
> won't be able to retry a failed backup if there's a new job running).
>
> [History]
>
> v10: Replaced per-action parameter with per-transaction properties.
> Patches 10,11 were split into 10-12.
>
> v9: this version fixes a reference count problem with job->bs,
> in patch 05.
>
> v8: Rebase on to master.
> Minor fixes addressing John Snow's comments.
>
> v7: Add Eric's rev-by in 1, 11.
> Add Max's rev-by in 4, 5, 9, 10, 11.
> Add John's rev-by in 5, 6, 8.
> Fix wording for 6. [John]
> Fix comment of block_job_txn_add_job() in 9. [Max]
> Remove superfluous hunks, and document default value in 11. [Eric]
> Update Makefile dep in 14. [Max]
>
> ________________________________________________________________________________
>
> For convenience, this branch is available at:
> https://github.com/jnsnow/qemu.git branch block-transpop
> https://github.com/jnsnow/qemu/tree/block-transpop
>
> This version is tagged block-transpop-v10:
> https://github.com/jnsnow/qemu/releases/tag/block-transpop-v10
>
> Fam Zheng (6):
> backup: Extract dirty bitmap handling as a separate function
> blockjob: Introduce reference count and fix reference to job->bs
> blockjob: Add .commit and .abort block job actions
> blockjob: Add "completed" and "ret" in BlockJob
> blockjob: Simplify block_job_finish_sync
> block: Add block job transactions
>
> John Snow (7):
> qapi: Add transaction support to block-dirty-bitmap operations
> iotests: add transactional incremental backup test
> block: rename BlkTransactionState and BdrvActionOps
> block/backup: Rely on commit/abort for cleanup
> block: Add BlockJobTxn support to backup_run
> block: add transactional properties
> iotests: 124 - transactional failure test
>
> Stefan Hajnoczi (1):
> tests: add BlockJobTxn unit test
>
> block.c | 19 +-
> block/backup.c | 50 ++++--
> block/mirror.c | 2 +-
> blockdev.c | 430 ++++++++++++++++++++++++++++++++++-----------
> blockjob.c | 188 ++++++++++++++++----
> docs/bitmaps.md | 6 +-
> include/block/block.h | 2 +-
> include/block/block_int.h | 6 +-
> include/block/blockjob.h | 85 ++++++++-
> qapi-schema.json | 54 +++++-
> qemu-img.c | 3 -
> qmp-commands.hx | 2 +-
> tests/Makefile | 3 +
> tests/qemu-iotests/124 | 182 ++++++++++++++++++-
> tests/qemu-iotests/124.out | 4 +-
> tests/test-blockjob-txn.c | 244 +++++++++++++++++++++++++
> 16 files changed, 1108 insertions(+), 172 deletions(-)
> create mode 100644 tests/test-blockjob-txn.c
>
next prev parent reply other threads:[~2015-11-02 21:06 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-23 23:56 [Qemu-devel] [PATCH v10 00/14] block: incremental backup transactions using BlockJobTxn John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 01/14] qapi: Add transaction support to block-dirty-bitmap operations John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 02/14] iotests: add transactional incremental backup test John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 03/14] block: rename BlkTransactionState and BdrvActionOps John Snow
2015-11-03 16:33 ` [Qemu-devel] [Qemu-block] " Jeff Cody
2015-11-03 17:32 ` John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 04/14] backup: Extract dirty bitmap handling as a separate function John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 05/14] blockjob: Introduce reference count and fix reference to job->bs John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 06/14] blockjob: Add .commit and .abort block job actions John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 07/14] blockjob: Add "completed" and "ret" in BlockJob John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 08/14] blockjob: Simplify block_job_finish_sync John Snow
2015-11-03 13:52 ` Stefan Hajnoczi
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 09/14] block: Add block job transactions John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 10/14] block/backup: Rely on commit/abort for cleanup John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 11/14] block: Add BlockJobTxn support to backup_run John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 12/14] block: add transactional properties John Snow
2015-11-03 15:17 ` Stefan Hajnoczi
2015-11-03 17:27 ` John Snow
2015-11-05 10:47 ` Stefan Hajnoczi
2015-11-05 18:52 ` John Snow
2015-11-05 19:35 ` Markus Armbruster
2015-11-05 19:43 ` John Snow
2015-11-06 8:32 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2015-11-06 16:36 ` Stefan Hajnoczi
2015-11-06 18:46 ` John Snow
2015-11-06 20:35 ` John Snow
2015-11-03 15:23 ` [Qemu-devel] " Eric Blake
2015-11-03 17:31 ` John Snow
2015-11-03 17:35 ` Eric Blake
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 13/14] iotests: 124 - transactional failure test John Snow
2015-10-23 23:56 ` [Qemu-devel] [PATCH v10 14/14] tests: add BlockJobTxn unit test John Snow
2015-11-02 21:06 ` John Snow [this message]
2015-11-03 15:22 ` [Qemu-devel] [PATCH v10 00/14] block: incremental backup transactions using BlockJobTxn Stefan Hajnoczi
2015-11-03 17:46 ` John Snow
2015-11-03 22:07 ` 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=5637D040.3000900@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.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 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.