From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5a3F-0001Pz-4j for qemu-devel@nongnu.org; Wed, 25 May 2016 10:44:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5a3E-0008UB-6G for qemu-devel@nongnu.org; Wed, 25 May 2016 10:44:49 -0400 References: <1464179363-19821-1-git-send-email-kwolf@redhat.com> <1464179363-19821-4-git-send-email-kwolf@redhat.com> From: Max Reitz Message-ID: <95c4f3a0-ddfc-b17b-7518-052ce2d8c9fa@redhat.com> Date: Wed, 25 May 2016 16:44:38 +0200 MIME-Version: 1.0 In-Reply-To: <1464179363-19821-4-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e9NwU5JisSF7EI6FSWVgqV5VdH6OCPcKp" Subject: Re: [Qemu-devel] [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, jcody@redhat.com, jsnow@redhat.com, qemu-devel@nongnu.org, eblake@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e9NwU5JisSF7EI6FSWVgqV5VdH6OCPcKp From: Max Reitz To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, jcody@redhat.com, jsnow@redhat.com, qemu-devel@nongnu.org, eblake@redhat.com Message-ID: <95c4f3a0-ddfc-b17b-7518-052ce2d8c9fa@redhat.com> Subject: Re: [PATCH v3 03/15] block: Cancel jobs first in bdrv_close_all() References: <1464179363-19821-1-git-send-email-kwolf@redhat.com> <1464179363-19821-4-git-send-email-kwolf@redhat.com> In-Reply-To: <1464179363-19821-4-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 25.05.2016 14:29, Kevin Wolf wrote: > So far, bdrv_close_all() first removed all root BlockDriverStates of > BlockBackends and monitor owned BDSes, and then assumed that the > remaining BDSes must be related to jobs and cancelled these jobs. >=20 > This order doesn't work that well any more when block jobs use > BlockBackends internally because then they will lose their BDS before > being cancelled. >=20 > This patch changes bdrv_close_all() to first cancel all jobs and then > remove all root BDSes from the remaining BBs. >=20 > Signed-off-by: Kevin Wolf > Reviewed-by: Eric Blake > Reviewed-by: Alberto Garcia > --- > block.c | 23 ++--------------------- > blockjob.c | 13 +++++++++++++ > include/block/blockjob.h | 7 +++++++ > 3 files changed, 22 insertions(+), 21 deletions(-) Reviewed-by: Max Reitz --e9NwU5JisSF7EI6FSWVgqV5VdH6OCPcKp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXRbpWAAoJEDuxQgLoOKytaSoH/jL5xXcm1uF6Qtcf+Ii71gg7 qiNeYCN38VVn/R0+JRYmh989MKul8Y/3PaIdYpdhQNqbgR3Y3CE5NnVk7TD5H8Uz FFhhUkQEaq3ChJRIudmpMPB4wX8UTkq5KsIpSWwJ6J7ndVOCt+wr9CXCClrkvpiO vyiCfCgW77vquS9bnT8OfZzujRYAf/lZEB3LMOBTDGmxJ5+hkNNyMbqS8WFvWbMR qZX+E110rR/d5ilriMm3uwFhwCpNDAHyguFanxdfCq159AP6cL4EFxCPDT9YcsJv oNfdpiAbZOgVlWPs4fiqOri14f8tUHXzDD+KMp7avD0Vywa9vUk6AAVuYEaTJIY= =1ibV -----END PGP SIGNATURE----- --e9NwU5JisSF7EI6FSWVgqV5VdH6OCPcKp--