On 04/08/2017 11:58, Stefan Hajnoczi wrote: >> the root cause of this bug is related to this as well: >> https://lists.gnu.org/archive/html/qemu-devel/2017-07/msg02945.html >> >> From commit 99723548 we started assuming (incorrectly?) that blk_ >> functions always WILL have an attached BDS, but this is not always true, >> for instance, flushing the cache from an empty CDROM. >> >> Paolo, can we move the flight counter increment outside of the >> block-backend layer, is that safe? > I think the bdrv_inc_in_flight(blk_bs(blk)) needs to be fixed > regardless of the throttling timer issue discussed below. BB cannot > assume that the BDS graph is non-empty.
Can we make bdrv_aio_* return NULL (even temporarily) if there is no attached BDS? That would make it much easier to fix. Paolo