Received: from eggs.gnu.org ([2001:4830:134:3::10]:45896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfnPp-0005PL-UC for qemu-devel@nongnu.org; Wed, 08 Apr 2015 06:41:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfnPm-0005C7-5T for qemu-devel@nongnu.org; Wed, 08 Apr 2015 06:41:01 -0400 Date: Wed, 8 Apr 2015 11:40:18 +0100 From: Stefan Hajnoczi Message-ID: <20150408104018.GJ28835@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="CxDuMX1Cv2n9FQfo" Content-Disposition: inline In-Reply-To: <1428069921-2957-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [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: Kevin Wolf , berto@igalia.com, qemu-block@nongnu.org, Jeff Cody , qemu-devel@nongnu.org, pbonzini@redhat.com --CxDuMX1Cv2n9FQfo 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 >=20 > --=20 > 2.1.0 >=20 Reviewed-by: Stefan Hajnoczi --CxDuMX1Cv2n9FQfo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVJQWSAAoJEJykq7OBq3PIcg8H/jaBVh5G3Bn50G6yMfdTsZml SWgC4i3MM1y7V7rTMN1T9vElF1Cb21XIb++GQGXOTY35LMwHWSTLiab9JOKd/02V IeagYi0r1ZgItvFt3A7W1QZGXaZBfdu6+ursf/M43dThnn76+2GC8J7ULKq/Bz9v nMIgz0vGlq3kz44reNC9iFmbMWc9NOg4chLKwjpIa28XdlndJXaVzriC8Lum4hDl ZzCVXFZCQxJCFeJNc/3T/f9brXKW1aebTMCRQ0N9nuPE2kbkKFM1dW9aZRTzX7fP 2xoef2vS3TtW1e+XfwOrMcOQWhO4dTeIJ4OpVF5/GSiuG0gtZT1mv+5pKmPeMac= =CYyk -----END PGP SIGNATURE----- --CxDuMX1Cv2n9FQfo--