All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] job: Add job_wait_unpaused() for block-job-complete
@ 2021-04-09 13:29 Max Reitz
  2021-04-09 13:29 ` [PATCH v2 1/3] " Max Reitz
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Max Reitz @ 2021-04-09 13:29 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Vladimir Sementsov-Ogievskiy, John Snow, qemu-devel,
	Max Reitz

Hi,

v1:
https://lists.nongnu.org/archive/html/qemu-block/2021-04/msg00215.html

Alternative:
https://lists.nongnu.org/archive/html/qemu-block/2021-04/msg00261.html


Compared to v1, I’ve added an aio_wait_kick() to job_pause_point() (as
suggested by Kevin) and adjusted the error message on job->user_paused
(as suggested by John).  I’ve kept the job->pause_count > 0 block
because of the concern of nested event loops Kevin raised, and I’ve
expanded its comment to explain the problem (I hope).

Note also the new note in patch 1’s commit message, which explains how
we’d ideally want block-job-complete to be a coroutine QMP handler so we
could yield instead of polling.


Furthermore, I’ve added the flaky test that I’ve also appended to the
alternative series.  Sometimes it fails 50/100 times for me, sometimes
more like 20/100.  (On master.)  Maybe it won’t reproduce the problem
for you at all.


git-backport-diff against v1:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/4:[0015] [FC] 'job: Add job_wait_unpaused() for block-job-complete'
002/4:[----] [--] 'test-blockjob: Test job_wait_unpaused()'
003/4:[----] [--] 'iotests/041: block-job-complete on user-paused job'
004/4:[down] 'iotests: Test completion immediately after drain'



Max Reitz (4):
  job: Add job_wait_unpaused() for block-job-complete
  test-blockjob: Test job_wait_unpaused()
  iotests/041: block-job-complete on user-paused job
  iotests: Test completion immediately after drain

 include/qemu/job.h                            |  15 ++
 blockdev.c                                    |   3 +
 job.c                                         |  53 +++++++
 tests/unit/test-blockjob.c                    | 140 ++++++++++++++++++
 tests/qemu-iotests/041                        |  13 +-
 .../tests/mirror-complete-after-drain         |  89 +++++++++++
 .../tests/mirror-complete-after-drain.out     |  14 ++
 7 files changed, 326 insertions(+), 1 deletion(-)
 create mode 100755 tests/qemu-iotests/tests/mirror-complete-after-drain
 create mode 100644 tests/qemu-iotests/tests/mirror-complete-after-drain.out

-- 
2.29.2



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

end of thread, other threads:[~2021-04-09 13:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 13:29 [PATCH v2 0/3] job: Add job_wait_unpaused() for block-job-complete Max Reitz
2021-04-09 13:29 ` [PATCH v2 1/3] " Max Reitz
2021-04-09 13:29 ` [PATCH v2 2/3] test-blockjob: Test job_wait_unpaused() Max Reitz
2021-04-09 13:29 ` [PATCH v2 3/3] iotests/041: block-job-complete on user-paused job Max Reitz
2021-04-09 13:45   ` Max Reitz
2021-04-09 13:29 ` [PATCH v2 4/3] iotests: Test completion immediately after drain Max Reitz

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.