From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGaup-0006BW-Sz for qemu-devel@nongnu.org; Wed, 28 Jan 2015 17:16:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGauo-0004Zy-Vo for qemu-devel@nongnu.org; Wed, 28 Jan 2015 17:16:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGauo-0004Zt-Nh for qemu-devel@nongnu.org; Wed, 28 Jan 2015 17:16:50 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0SMGn5I002841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 28 Jan 2015 17:16:50 -0500 Message-ID: <54C95FD0.2010001@redhat.com> Date: Wed, 28 Jan 2015 15:16:48 -0700 From: Eric Blake MIME-Version: 1.0 References: <1422300468-16216-1-git-send-email-mreitz@redhat.com> <1422300468-16216-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1422300468-16216-3-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9NpWDEsXS7xKFIMvOrxLboqlEeIjvQlwq" Subject: Re: [Qemu-devel] [PATCH 02/21] quorum: Fix close path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9NpWDEsXS7xKFIMvOrxLboqlEeIjvQlwq Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/26/2015 12:27 PM, Max Reitz wrote: > bdrv_unref() can lead to bdrv_close(), which in turn will result in > bdrv_drain_all(). This function will later be called blk_drain_all() an= d > iterate only over the BlockBackends for which blk_is_inserted() holds > true; therefore, bdrv_is_inserted() and thus quorum_is_inserted() will > probably be called. >=20 > This patch makes quorum_is_inserted() aware of the fact that some > children may have been closed already. >=20 > Signed-off-by: Max Reitz > --- > block/quorum.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > for (i =3D 0; i < s->num_children; i++) { > - if (!bdrv_is_inserted(s->bs[i])) { > + if (s->bs[i] && !bdrv_is_inserted(s->bs[i])) { > return 0; May have a minor conflict if you fix the earlier series to use bool for this function's return type. But that should not get in the way of: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9NpWDEsXS7xKFIMvOrxLboqlEeIjvQlwq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUyV/QAAoJEKeha0olJ0NqwdwH/35FpUjiZolhKJwZqYzSWTA1 7700w4NBeeniUWn/eZULsJC29JfroYQNl+wntel7HLhYRPrgHeXDbt0OL1ng+APT 9H/Mw9NA4cXMyMmXooAYVTPQW8dV4WTP8jmXsh5SOYqMExaKzCmBmxWZ0QOge6Ia mMhouqJ6RKPexSmW1Xn1WDkwk5LCa58KJ7vmsMjdh8Ya+NVGLZUaJYlfjdVZvKNm nXf8AZm10j+yhCuwb0wET5HPftQ2zNId8poUWjvw5jzbphqQDiad/QC/nPocV+fS ALufELeQ4Y2z/w/rKBzH0ChoutEtGFucC/CUX1k1M7GrwmWXWFOBXZi9C6Rg134= =ILqs -----END PGP SIGNATURE----- --9NpWDEsXS7xKFIMvOrxLboqlEeIjvQlwq--