Received: from eggs.gnu.org ([2001:4830:134:3::10]:50591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1Cvo-0000On-0Z for qemu-devel@nongnu.org; Fri, 13 May 2016 09:15:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1Cvi-0001CU-Uf for qemu-devel@nongnu.org; Fri, 13 May 2016 09:15:03 -0400 References: <1462354765-14037-1-git-send-email-kwolf@redhat.com> <1462354765-14037-3-git-send-email-kwolf@redhat.com> From: Max Reitz Message-ID: Date: Fri, 13 May 2016 15:14:02 +0200 MIME-Version: 1.0 In-Reply-To: <1462354765-14037-3-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FReoFSwrsv67lacDqGowMXI0iJDB8ursx" Subject: Re: [Qemu-devel] [PATCH 02/14] 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: jcody@redhat.com, jsnow@redhat.com, berto@igalia.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --FReoFSwrsv67lacDqGowMXI0iJDB8ursx From: Max Reitz To: Kevin Wolf , qemu-block@nongnu.org Cc: jcody@redhat.com, jsnow@redhat.com, berto@igalia.com, qemu-devel@nongnu.org Message-ID: Subject: Re: [PATCH 02/14] block: Cancel jobs first in bdrv_close_all() References: <1462354765-14037-1-git-send-email-kwolf@redhat.com> <1462354765-14037-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1462354765-14037-3-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable On 04.05.2016 11:39, 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 > --- > block.c | 23 +---------------------- > blockjob.c | 13 +++++++++++++ > include/block/blockjob.h | 7 +++++++ > 3 files changed, 21 insertions(+), 22 deletions(-) I agree with Berto about the assertion because it was me who suggested it. :-) And because I didn't give Berto an R-b because of that I'm afraid I can't give you one either. O:-) Max --FReoFSwrsv67lacDqGowMXI0iJDB8ursx 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 iQEcBAEBCAAGBQJXNdMaAAoJEDuxQgLoOKytpwAIAKNOsG5x8JjYmEloPagDj5yv H9Ncb2D1+BBnYqPtGWbI7G2z/zmHl+kLj0z5bILE4P5kU7MbWI46tFqAVCzjIUYI bERIlUV+TEfpMsgmgkokf5FG1F4ZcZ0DYBMTj3+1ja6lI/Z/fe9dtqdgr/GcToc/ 0Inq8vmGONIULDt1sgDzPrbgNX4ygTjWaTS1YugZOyYCEk4kDtML/7jqH6fbaZ37 hTGXx9xLr3NdDO71RwHp/XLzQHUdegIpvQ9/RMA+UvDRjJKpcZtFRaC9PnuJf1vJ xdK/zUEFaRtlH4ARntJ7p0/oaeB+dx3f52t+CS6J1S2giHf8f25BB5tBgbeev28= =VsGX -----END PGP SIGNATURE----- --FReoFSwrsv67lacDqGowMXI0iJDB8ursx--