All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] jobs: remove job_defer_to_main_loop
@ 2018-08-17 19:04 John Snow
  2018-08-17 19:04 ` [Qemu-devel] [PATCH 1/7] jobs: change start callback to run callback John Snow
                   ` (10 more replies)
  0 siblings, 11 replies; 53+ messages in thread
From: John Snow @ 2018-08-17 19:04 UTC (permalink / raw)
  To: qemu-block, qemu-devel; +Cc: Jeff Cody, kwolf, jtc, Max Reitz, John Snow

First, it's redundant to have each job manage this itself.
Second, doing so 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.

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, this new
completion callback will be removed.

John Snow (7):
  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
  jobs: remove job_defer_to_main_loop

 block/backup.c            | 23 +++-------------
 block/commit.c            | 27 ++++++-------------
 block/create.c            | 19 +++++--------
 block/mirror.c            | 35 +++++++++++-------------
 block/stream.c            | 29 ++++++++------------
 include/qemu/job.h        | 36 +++++++++----------------
 job-qmp.c                 |  5 ++--
 job.c                     | 68 +++++++++++++++--------------------------------
 tests/test-bdrv-drain.c   | 13 +++------
 tests/test-blockjob-txn.c | 25 +++++++----------
 tests/test-blockjob.c     | 17 ++++++------
 11 files changed, 102 insertions(+), 195 deletions(-)

-- 
2.14.4

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2018-09-04  2:14 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-17 19:04 [Qemu-devel] [PATCH 0/7] jobs: remove job_defer_to_main_loop John Snow
2018-08-17 19:04 ` [Qemu-devel] [PATCH 1/7] jobs: change start callback to run callback John Snow
2018-08-20 18:28   ` Eric Blake
2018-08-20 19:04     ` John Snow
2018-08-22 10:51   ` Max Reitz
2018-08-22 23:01     ` John Snow
2018-08-25 13:33       ` Max Reitz
2018-08-25 14:15         ` Max Reitz
2018-08-27 16:01         ` John Snow
2018-08-17 19:04 ` [Qemu-devel] [PATCH 2/7] jobs: canonize Error object John Snow
2018-08-20 20:03   ` Eric Blake
2018-08-21  0:10   ` John Snow
2018-08-22 10:59     ` Max Reitz
2018-08-22 22:50       ` John Snow
2018-08-25 13:15         ` Max Reitz
2018-08-22 11:09   ` Max Reitz
2018-08-22 11:11   ` Max Reitz
2018-08-17 19:04 ` [Qemu-devel] [PATCH 3/7] jobs: add exit shim John Snow
2018-08-20 21:16   ` Eric Blake
2018-08-22 11:43   ` Max Reitz
2018-08-22 11:52     ` Max Reitz
2018-08-22 21:45       ` John Snow
2018-08-25 12:54         ` Max Reitz
2018-08-22 21:52     ` John Snow
2018-08-25 13:05       ` Max Reitz
2018-08-27 15:54         ` John Snow
2018-08-29  8:16           ` Max Reitz
2018-08-22 22:01     ` Eric Blake
2018-08-22 22:04       ` John Snow
2018-08-17 19:04 ` [Qemu-devel] [PATCH 4/7] block/commit: utilize job_exit shim John Snow
2018-08-17 19:18   ` John Snow
2018-08-22 11:58     ` Max Reitz
2018-08-22 21:55       ` John Snow
2018-08-25 13:07         ` Max Reitz
2018-08-22 11:55   ` Max Reitz
2018-08-17 19:04 ` [Qemu-devel] [PATCH 5/7] block/mirror: " John Snow
2018-08-22 12:06   ` Max Reitz
2018-08-22 12:15   ` Max Reitz
2018-08-22 22:05     ` John Snow
2018-08-25 15:02       ` Max Reitz
2018-08-25 15:14         ` Max Reitz
2018-08-28 20:25         ` John Snow
2018-08-29  8:28           ` Max Reitz
2018-08-28 21:51         ` John Snow
2018-08-17 19:04 ` [Qemu-devel] [PATCH 6/7] jobs: " John Snow
2018-08-22 12:20   ` Max Reitz
2018-08-22 23:40     ` John Snow
2018-08-17 19:04 ` [Qemu-devel] [PATCH 7/7] jobs: remove job_defer_to_main_loop John Snow
2018-08-22 12:21   ` Max Reitz
2018-08-18 16:27 ` [Qemu-devel] [PATCH 0/7] " no-reply
2018-08-18 16:31 ` no-reply
2018-09-04  2:06 ` no-reply
2018-09-04  2:09 ` no-reply

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.