From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkDmJ-0005Eh-9K for qemu-devel@nongnu.org; Mon, 20 Apr 2015 11:38:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkDmG-0008N9-GD for qemu-devel@nongnu.org; Mon, 20 Apr 2015 11:38:31 -0400 Date: Mon, 20 Apr 2015 16:38:24 +0100 From: Stefan Hajnoczi Message-ID: <20150420153824.GC32653@stefanha-thinkpad.redhat.com> References: <1428069921-2957-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1ccMZA6j1vT5UqiK" Content-Disposition: inline In-Reply-To: <1428069921-2957-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/4] Fix "stop" draining block jobs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: pbonzini@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, qemu-block@nongnu.org --1ccMZA6j1vT5UqiK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 03, 2015 at 10:05:17PM +0800, Fam Zheng wrote: > v2: Use "pause" approach as suggested by Paolo. >=20 > 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 bl= ock > jobs are unhelpful. That is because the timer will fire too soon, even be= fore > the aio_poll in bdrv_drain_all returns. >=20 > Fix this by pausing all the block jobs during bdrv_drain_all. >=20 > Please review! >=20 > Fam >=20 >=20 > 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 >=20 > 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 Thanks, applied to my block-next tree: https://github.com/stefanha/qemu/commits/block-next Stefan --1ccMZA6j1vT5UqiK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVNR1wAAoJEJykq7OBq3PI94IH/ROcf73zlaLi1FE0O9PcXRES hLIoCR3xfHCu1KBC+I+bYdUmbFeofwAaRBkKDSGJWuxIj4zGgbExHq+rvFjtgt1p pQwNtsWW3Q5hFDAchtut5jeDdl//fb2z6JFbhCfIQc7ET7bf+Bn0OAMueIB8q3op zKE8i6LvUXUz0Wl2mSwNXOA/v3r6DIwR0FceIsQYLnkVnVw5MffFuWMoGn7siS9L u7NL1MBrMYUspSAiG6WpI+BWKlUBIu+S5VWt/jE3GVUFqNVJFgOzA6P0SFro0SNY e8jPDLCcEp0dD/69ifitDD1kwZP2IxT4qTDnYdPLhHDHlWZafXTaY7gRJqcx4/U= =bqim -----END PGP SIGNATURE----- --1ccMZA6j1vT5UqiK--