jobs: defer graph changes until finalize
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest21 patches 25 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | jobs: canonize Error objectblock/ block/ block/ +8 more | +21 | 3 replies | |
| 2/21 | jobs: add exit shiminclude/ job.c | +26 | 5 replies | |
| 3/21 | block/backup: utilize job_exit shimblock/ | +1 | 0 replies | |
| 4/21 | block/commit: utilize job_exit shimblock/ | +5 | 5 replies | |
| 5/21 | block/mirror: utilize job_exit shimblock/ | +11 | 1 reply | |
| 6/21 | block/stream: utilize job_exit shimblock/ | +8 | 1 reply | |
| 7/21 | block/create: utilize job_exit shimblock/ | +1 | 0 replies | |
| 8/21 | tests/test-blockjob-txn: utilize job_exit shimtests/ | +3 | 0 replies | |
| 9/21 | tests/test-blockjob: utilize job_exit shimtests/ | +4 | 0 replies | |
| 10/21 | tests/test-bdrv-drain: utilize job_exit shimtests/ | +0 | 0 replies | |
| 11/21 | jobs: remove job_defer_to_main_loopinclude/ job.c | +2 | 0 replies | |
| 12/21 | jobs: allow entrypoints to return status codeblock/ block/ block/ +7 more | +35 | 0 replies | |
| 13/21 | block/commit: add block job creation flagsblock/ blockdev.c include/ | +11 | 0 replies | |
| 14/21 | block/mirror: add block job creation flagsblock/ blockdev.c include/ | +9 | 0 replies | |
| 15/21 | block/stream: add block job creation flagsblock/ blockdev.c include/ | +9 | 0 replies | |
| 16/21 | block/commit: refactor commit to use job callbacksblock/ | +61 | 4 replies | |
| 17/21 | block/mirror: conservative mirror_exit refactorblock/ | +22 | 0 replies | |
| 18/21 | block/commit: refactor stream to use job callbacksblock/ | +15 | 0 replies | |
| 19/21 | qapi/block-commit: expose new job propertiesblockdev.c qapi/ | +10 | 3 replies | |
| 20/21 | qapi/block-mirror: expose new job propertiesblockdev.c qapi/ | +18 | 0 replies | |
| 21/21 | qapi/block-stream: expose new job propertiesblockdev.c hmp.c qapi/ | +14 | 0 replies |
Reviews trailers per patch
4 of 21 patches have a Reviewed-by or Acked-by.
| Patch | Jeff Cody |
|---|---|
| 1/21 | |
| 2/21 | R-b |
| 3/21 | |
| 4/21 | R-b |
| 5/21 | R-b |
| 6/21 | R-b |
| 7/21 | |
| 8/21 | |
| 9/21 | |
| 10/21 | |
| 11/21 | |
| 12/21 | |
| 13/21 | |
| 14/21 | |
| 15/21 | |
| 16/21 | |
| 17/21 | |
| 18/21 | |
| 19/21 | |
| 20/21 | |
| 21/21 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH 00/21] jobs: defer graph changes until finalize
This series forces all jobs to use the "finalize" semantics that were introduced previously, but only exposed via the backup jobs. This series looks huge, but it's mostly mechanical changes broken out into a series of much smaller commits so that the changes are easier to follow at each step.
Patches one and two refactor jobs to allow a centralized call to job_completed, which allows us to avoid calling this function from underneath job_defer_to_main_loop_bh, which takes the aio_context lock.
Patches 3-10 take advantage of the new centralized job exit code, one job at a time. This should be a net reduction in SLOC.
Patch 11 removes the old job_defer_to_main_loop code. If it wasn't a net reduction in SLOC before, it is now.
Patch 12 is not necessary, but changes job entry routines to return a status code instead of asking you to store the retcode in the job object, so that coroutine functions read more like standard ones. SLOC balance is a wash slightly against my favor.
Patches 13-15 add job creation flags to the commit, mirror, and stream jobs respectively which previously did not filter these flags down to job creation time.
Patches 16-18 refactor the completion code for commit, mirror and stream respectively to allow graph manipulations to happen exclusively after the finalization step instead of immediately.
Patches 19-21 expose the new job creation flags to users via QMP.
John Snow (21):
jobs: canonize Error object
jobs: add exit shim
block/backup: utilize job_exit shim block/commit: utilize job_exit shim block/mirror: utilize job_exit shim block/stream: utilize job_exit shim block/create: utilize job_exit shim tests/test-blockjob-txn: utilize job_exit shim tests/test-blockjob: utilize job_exit shim tests/test-bdrv-drain: utilize job_exit shim
jobs: remove job_defer_to_main_loop
jobs: allow entrypoints to return status code block/commit: add block job creation flags block/mirror: add block job creation flags block/stream: add block job creation flags block/commit: refactor commit to use job callbacks block/mirror: conservative mirror_exit refactor block/commit: refactor stream to use job callbacks qapi/block-commit: expose new job properties qapi/block-mirror: expose new job properties qapi/block-stream: expose new job properties
block/backup.c | 21 ++------- block/commit.c | 116 +++++++++++++++++++++++++++------------------- block/create.c | 16 ++----- block/mirror.c | 54 +++++++++++++-------- block/stream.c | 43 ++++++++--------- blockdev.c | 44 ++++++++++++++++-- hmp.c | 5 +- include/block/block_int.h | 15 ++++-- include/qemu/job.h | 36 +++++--------- job-qmp.c | 5 +- job.c | 64 ++++++++----------------- qapi/block-core.json | 12 +++-- tests/test-bdrv-drain.c | 11 ++--- tests/test-blockjob-txn.c | 23 ++++----- tests/test-blockjob.c | 16 +++---- 15 files changed, 247 insertions(+), 234 deletions(-)
Signature · 1 line
2.14.4