On 02/08/2018 11:18 AM, Stefan Hajnoczi wrote:
Using bdrv_inc_in_flight(blk_bs(blk)) doesn't work since BlockBackend->root may
be NULL.

This patch series solves the issue by adding an BlockBackend->in_flight counter
so requests can be tracked even when there is no BlockDriverState.

This should fix the IDE and virtio-blk segfaults that have been encountered
when there is no BlockDriverState.

The patch is based on work by Kevin Wolf.

Kevin Wolf (1):
   block: test blk_aio_flush() with blk->root == NULL

Stefan Hajnoczi (2):
   block: add BlockBackend->in_flight counter
   Revert "IDE: Do not flush empty CDROM drives"

Tested by applying the series out of order (2, 3, 1) - the new test fails after 2 (so even our workaround was not robust), fails after 3 (expected there, because we revert the workaround), then finally passes after 1 (the correct fix with no workaround needed). So for the series, you can add:
Tested-by: Eric Blake <ebl...@redhat.com>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to