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() and > 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. > > This patch makes quorum_is_inserted() aware of the fact that some > children may have been closed already. > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block/quorum.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >
> for (i = 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 <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature