qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4] Fix "stop" draining block jobs
@ 2015-04-03 14:05 Fam Zheng
  2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 1/4] blockjob: Allow nested pause Fam Zheng
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Fam Zheng @ 2015-04-03 14:05 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, berto, qemu-block, Jeff Cody, Stefan Hajnoczi,
	pbonzini

v2: Use "pause" approach as suggested by Paolo.

Stopping the vm will drive the block job all the way to the end, because the
sleep duration is too short, which means the block_job_sleep_ns in the block
jobs are unhelpful. That is because the timer will fire too soon, even before
the aio_poll in bdrv_drain_all returns.

Fix this by pausing all the block jobs during bdrv_drain_all.

Please review!

Fam


Fam Zheng (4):
  blockjob: Allow nested pause
  block: Pause block jobs in bdrv_drain_all
  qemu-iotests: Test that "stop" doesn't drain block jobs
  blockjob: Update function name in comments

 block.c                    | 20 +++++++++++
 block/backup.c             |  2 +-
 block/mirror.c             |  4 +--
 blockdev.c                 |  8 +++--
 blockjob.c                 | 23 +++++++++----
 include/block/blockjob.h   | 20 ++++++++---
 tests/qemu-iotests/129     | 86 ++++++++++++++++++++++++++++++++++++++++++++++
 tests/qemu-iotests/129.out |  5 +++
 tests/qemu-iotests/group   |  1 +
 9 files changed, 153 insertions(+), 16 deletions(-)
 create mode 100644 tests/qemu-iotests/129
 create mode 100644 tests/qemu-iotests/129.out

-- 
2.1.0

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

end of thread, other threads:[~2015-04-27 11:08 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-03 14:05 [Qemu-devel] [PATCH v2 0/4] Fix "stop" draining block jobs Fam Zheng
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 1/4] blockjob: Allow nested pause Fam Zheng
2015-04-03 14:13   ` Paolo Bonzini
2015-04-20 17:11     ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-08  7:25   ` [Qemu-devel] " Alberto Garcia
2015-04-08 10:31   ` Stefan Hajnoczi
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 2/4] block: Pause block jobs in bdrv_drain_all Fam Zheng
2015-04-07 13:59   ` Alberto Garcia
2015-04-08 10:37   ` Stefan Hajnoczi
2015-04-08 14:56     ` Alberto Garcia
2015-04-09 10:34       ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 3/4] qemu-iotests: Test that "stop" doesn't drain block jobs Fam Zheng
2015-04-07 14:46   ` Alberto Garcia
2015-04-08 10:39   ` Stefan Hajnoczi
2015-04-24 15:43   ` [Qemu-devel] [Qemu-block] " Max Reitz
2015-04-27  5:14     ` Fam Zheng
2015-04-27 11:08       ` Max Reitz
2015-04-03 14:05 ` [Qemu-devel] [PATCH v2 4/4] blockjob: Update function name in comments Fam Zheng
2015-04-07 14:46   ` Alberto Garcia
2015-04-08 10:40 ` [Qemu-devel] [PATCH v2 0/4] Fix "stop" draining block jobs Stefan Hajnoczi
2015-04-20 15:38 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).