jobs: Job Exit Refactoring Pt 1
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest9 patches 13 repliesIn review
- v17 patches 41 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | jobs: change start callback to run callbackblock/ block/ block/ +7 more | +43 | 3 replies | |
| 2/9 | jobs: canonize Error objectblock/ block/ block/ +8 more | +22 | 2 replies | |
| 3/9 | jobs: add exit shiminclude/ job.c | +29 | 1 reply | |
| 4/9 | block/commit: utilize job_exit shimblock/ | +5 | 1 reply | |
| 5/9 | block/mirror: utilize job_exit shimblock/ | +9 | 1 reply | |
| 6/9 | jobs: utilize job_exit shimblock/ block/ block/ +3 more | +16 | 1 reply | |
| 7/9 | block/backup: make function variables consistently namedblock/ | +31 | 1 reply | |
| 8/9 | jobs: remove ret argument to job_completed; privatize itinclude/ job.c trace-events | +18 | 2 replies | |
| 9/9 | jobs: remove job_defer_to_main_loopinclude/ job.c | +2 | 1 reply |
Reviews trailers per patch
6 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Max Reitz |
|---|---|
| 1/9 | R-b |
| 2/9 | |
| 3/9 | R-b |
| 4/9 | R-b |
| 5/9 | |
| 6/9 | R-b |
| 7/9 | R-b |
| 8/9 | |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 0/9] jobs: Job Exit Refactoring Pt 1
This is part one of a two part series that refactors the exit logic of jobs.
Part one removes job_defer_to_main_loop.
Part two removes the job->exit() callback introduced in part one.
It's redundant to have each job manage deferring to the main loop itself. Unifying this makes sense from an API standpoint. Doing so also allows us to remove a tricky case where the completion code is called under an aio_context lock, which then calls the finalization code which is itself executed under a second aio_context lock, leading to deadlocks.
Removing this recursive lock acquisition is necessary for converting mirror to only modify its graph post-finalization, but it's also just safer and will bite us less in the future.
This series introduces a job->exit callback, but after jobs are fully transitioned to using the .commit/.abort callbacks in Pt 2, this new completion callback will be removed again. It's only here as a crutch to let us investigate the completion refactoring in Pt 2 more carefully.
V2:
001/9:[----] [--] 'jobs: change start callback to run callback' 002/9:[0003] [FC] 'jobs: canonize Error object'
003/9:[0005] [FC] 'jobs: add exit shim'
004/9:[0002] [FC] 'block/commit: utilize job_exit shim' 005/9:[----] [--] 'block/mirror: utilize job_exit shim' 006/9:[----] [--] 'jobs: utilize job_exit shim'
007/9:[down] 'block/backup: make function variables consistently named' 008/9:[down] 'jobs: remove ret argument to job_completed; privatize it' 009/9:[----] [--] 'jobs: remove job_defer_to_main_loop'
002: Update commit message
Remove errant space (Eric, Max)
Update error message setting (Kevin)
003: Add comment clarifying that .exit is temporary/transitional (Max, Eric) 004: change reference from ret to job->ret
(Note: most of these references go away in Pt 2 of the series,
except for those in mirror_exit.) (for Max.)
007: Added, at Eric's suggestion.
008: Moved forward from Pt 2 of the series. (Max.)
Hopefully this version makes the trajectory clearer. --js
John Snow (9):
jobs: change start callback to run callback
jobs: canonize Error object
jobs: add exit shim
block/commit: utilize job_exit shim block/mirror: utilize job_exit shim
jobs: utilize job_exit shim
block/backup: make function variables consistently named
jobs: remove ret argument to job_completed; privatize it
jobs: remove job_defer_to_main_loop
block/backup.c | 81 +++++++++++++++++++---------------------------- block/commit.c | 29 ++++++----------- block/create.c | 19 ++++------- block/mirror.c | 35 +++++++++----------- block/stream.c | 29 +++++++---------- include/qemu/job.h | 62 +++++++++++++++--------------------- job-qmp.c | 5 +-- job.c | 73 +++++++++++++++--------------------------- tests/test-bdrv-drain.c | 13 +++----- tests/test-blockjob-txn.c | 25 ++++++--------- tests/test-blockjob.c | 17 +++++----- trace-events | 2 +- 12 files changed, 150 insertions(+), 240 deletions(-)
Signature · 1 line
2.14.4