From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, pkrempa@redhat.com, jtc@redhat.com,
qemu-devel@nongnu.org, John Snow <jsnow@redhat.com>
Subject: [Qemu-devel] [RFC v3 00/14] blockjobs: add explicit job management
Date: Fri, 26 Jan 2018 21:05:01 -0500 [thread overview]
Message-ID: <20180127020515.27137-1-jsnow@redhat.com> (raw)
For jobs that complete when a monitor isn't looking, there's no way to
tell what the job's final return code was. We need to allow jobs to
remain in the list until queried for reliable management.
Furthermore, it's not viable to have graph changes when the monitor
isn't looking either. We need at least another event for that.
This series is a rough sketch for the WAITING, PENDING and CONCLUDED
events that accompany an expanded job management scheme that a management
client can opt-in to.
V3:
- Added WAITING and PENDING events
- Added block_job_finalize verb
- Added .pending() callback for jobs
- Tweaked how .commit/.abort work
V2:
- Added tests!
- Changed property name (Jeff, Paolo)
RFC / Known problems:
- I need a lot more tests.
- Jobs need to actually implement their .pending callback for this to be of any
actual use.
- Mirror needs to be refactored to use the commit/abort/pending/clean callbacks
to fulfill the promise made by "no graph changes without user authorization"
that PENDING is supposed to offer
- Jobs beyond backup will be able to opt-in to the new management scheme in the
next version.
- V4 will include a forced synchronicity for jobs in a transaction; i.e. all
jobs will be forced to use either the old or new styles, but not a mix.
Please take a look and shout loudly if I'm wandering in the wrong direction.
________________________________________________________________________________
For convenience, this branch is available at:
https://github.com/jnsnow/qemu.git branch block-job-reap
https://github.com/jnsnow/qemu/tree/block-job-reap
This version is tagged block-job-reap-v3:
https://github.com/jnsnow/qemu/releases/tag/block-job-reap-v3
John Snow (14):
blockjobs: add manual property
blockjobs: Add status enum
blockjobs: add state transition table
blockjobs: RFC add block_job_verb permission table
blockjobs: add block_job_dismiss
blockjobs: add CONCLUDED state
blockjobs: ensure abort is called for cancelled jobs
blockjobs: add commit, abort, clean helpers
blockjobs: add prepare callback
blockjobs: Add waiting event
blockjobs: add PENDING status and event
blockjobs: add block-job-finalize
blockjobs: Expose manual property
iotests: test manual job dismissal
block/backup.c | 22 ++--
block/commit.c | 2 +-
block/mirror.c | 2 +-
block/replication.c | 5 +-
block/stream.c | 2 +-
block/trace-events | 2 +
blockdev.c | 42 ++++++-
blockjob.c | 279 ++++++++++++++++++++++++++++++++++++++++---
include/block/block_int.h | 9 +-
include/block/blockjob.h | 38 ++++++
include/block/blockjob_int.h | 12 +-
qapi/block-core.json | 135 +++++++++++++++++++--
tests/qemu-iotests/056 | 241 +++++++++++++++++++++++++++++++++++++
tests/qemu-iotests/056.out | 4 +-
tests/test-bdrv-drain.c | 4 +-
tests/test-blockjob-txn.c | 2 +-
tests/test-blockjob.c | 4 +-
17 files changed, 750 insertions(+), 55 deletions(-)
--
2.14.3
next reply other threads:[~2018-01-27 2:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-27 2:05 John Snow [this message]
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 01/14] blockjobs: add manual property John Snow
2018-01-29 16:59 ` Kevin Wolf
2018-01-29 17:34 ` John Snow
2018-01-29 17:46 ` Kevin Wolf
2018-01-29 17:52 ` John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 02/14] blockjobs: Add status enum John Snow
2018-01-29 17:04 ` Kevin Wolf
2018-01-29 17:38 ` John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 03/14] blockjobs: add state transition table John Snow
2018-01-29 17:17 ` Kevin Wolf
2018-01-29 19:07 ` John Snow
2018-01-29 19:56 ` Kevin Wolf
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 04/14] blockjobs: RFC add block_job_verb permission table John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 05/14] blockjobs: add block_job_dismiss John Snow
2018-01-29 17:38 ` Kevin Wolf
2018-01-29 20:33 ` John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 06/14] blockjobs: add CONCLUDED state John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 07/14] blockjobs: ensure abort is called for cancelled jobs John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 08/14] blockjobs: add commit, abort, clean helpers John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 09/14] blockjobs: add prepare callback John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 10/14] blockjobs: Add waiting event John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 11/14] blockjobs: add PENDING status and event John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 12/14] blockjobs: add block-job-finalize John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 13/14] blockjobs: Expose manual property John Snow
2018-01-27 2:05 ` [Qemu-devel] [RFC v3 14/14] iotests: test manual job dismissal John Snow
2018-01-27 2:25 ` [Qemu-devel] [RFC v3 00/14] blockjobs: add explicit job management no-reply
2018-02-01 0:08 ` 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=20180127020515.27137-1-jsnow@redhat.com \
--to=jsnow@redhat.com \
--cc=jtc@redhat.com \
--cc=kwolf@redhat.com \
--cc=pkrempa@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.