void bdrv_drain(BlockDriverState *bs)

{

    bool busy = true;



    bdrv_drain_recurse(bs);





    while (busy) {

        /* Keep iterating */

         bdrv_flush_io_queue(bs);

         busy = bdrv_requests_pending(bs);

         busy |= aio_poll(bdrv_get_aio_context(bs), busy);


void bdrv_drain(BlockDriverState *bs)

{

    bool busy = true;



    bdrv_drain_recurse(bs);





    while (busy) {

        

         bdrv_flush_io_queue(bs);

         busy = bdrv_requests_pending(bs);

         busy |= aio_poll(bdrv_get_aio_context(bs), busy);


void FUNC_0(BlockDriverState *VAR_0)

{

    bool busy = true;



    bdrv_drain_recurse(VAR_0);





    while (busy) {

        

         bdrv_flush_io_queue(VAR_0);

         busy = bdrv_requests_pending(VAR_0);

         busy |= aio_poll(bdrv_get_aio_context(VAR_0), busy);


void FUNC_0(BlockDriverState *VAR_0)
{ bool busy = true; bdrv_drain_recurse(VAR_0); while (busy) { bdrv_flush_io_queue(VAR_0); busy = bdrv_requests_pending(VAR_0); busy |= aio_poll(bdrv_get_aio_context(VAR_0), busy);