From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5KpO-0003iV-B8 for qemu-devel@nongnu.org; Tue, 24 May 2016 18:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5KpN-0006TN-Dt for qemu-devel@nongnu.org; Tue, 24 May 2016 18:29:30 -0400 References: <1464097654-12977-1-git-send-email-kwolf@redhat.com> <1464097654-12977-3-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <5744D5C1.5030306@redhat.com> Date: Tue, 24 May 2016 16:29:21 -0600 MIME-Version: 1.0 In-Reply-To: <1464097654-12977-3-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qLWM49Uf7e6fRpFPWkCLmJMN7NVwoS0EW" Subject: Re: [Qemu-devel] [PATCH v2 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: berto@igalia.com, jcody@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, jsnow@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qLWM49Uf7e6fRpFPWkCLmJMN7NVwoS0EW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/24/2016 07:47 AM, 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, 22 insertions(+), 21 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qLWM49Uf7e6fRpFPWkCLmJMN7NVwoS0EW 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXRNXBAAoJEKeha0olJ0NqhBAIAJ3GyV/2F4wd74twhhy141U6 w+clsM6rGNM03OCX1AY4U5jq1CNv+8K7P4rSrSLDs7FO2XjGZSbFBZmCAvzb54PP 3DFp+wXg955ardAwwlNWhKdx2ggxdWeUTilNSksQ9vdmvBE4mN4VV/X55NPPz1f6 i0OxDUWGdlDonhFTu/wsSdyUZitJP0pLOU2V6ZCn4BH4LAhyofVzoUqJkHfM8mh2 WTGNzWnWWSIm9vJIIXBeY10IDcngBO+yJCH+rbHzgYlyqgpXm8ULDWzy47/wLObm FwegOwaqgDZYQ/NsVyTMh7ccJM9QL5FOUg93v5oRAd8OkQyO5DVdA/T3nwMUsj0= =3lGo -----END PGP SIGNATURE----- --qLWM49Uf7e6fRpFPWkCLmJMN7NVwoS0EW--