static bool bdrv_drain_recurse(BlockDriverState *bs)

{

    BdrvChild *child;

    bool waited;



    waited = BDRV_POLL_WHILE(bs, atomic_read(&bs->in_flight) > 0);



    if (bs->drv && bs->drv->bdrv_drain) {

        bs->drv->bdrv_drain(bs);

    }



    QLIST_FOREACH(child, &bs->children, next) {

        waited |= bdrv_drain_recurse(child->bs);

    }



    return waited;

}

static bool bdrv_drain_recurse(BlockDriverState *bs)

{

    BdrvChild *child;

    bool waited;



    waited = BDRV_POLL_WHILE(bs, atomic_read(&bs->in_flight) > 0);



    if (bs->drv && bs->drv->bdrv_drain) {

        bs->drv->bdrv_drain(bs);

    }



    QLIST_FOREACH(child, &bs->children, next) {

        waited |= bdrv_drain_recurse(child->bs);

    }



    return waited;

}

    BdrvChild *child;     QLIST_FOREACH(child, &bs->children, next) {         waited |= bdrv_drain_recurse(child->bs);
static bool FUNC_0(BlockDriverState *bs)

{

    BdrvChild *child;

    bool waited;



    waited = BDRV_POLL_WHILE(bs, atomic_read(&bs->in_flight) > 0);



    if (bs->drv && bs->drv->bdrv_drain) {

        bs->drv->bdrv_drain(bs);

    }



    QLIST_FOREACH(child, &bs->children, next) {

        waited |= FUNC_0(child->bs);

    }



    return waited;

}

static bool FUNC_0(BlockDriverState *bs)
{ BdrvChild *child; bool waited; waited = BDRV_POLL_WHILE(bs, atomic_read(&bs->in_flight) > 0); if (bs->drv && bs->drv->bdrv_drain) { bs->drv->bdrv_drain(bs); } QLIST_FOREACH(child, &bs->children, next) { waited |= FUNC_0(child->bs); } return waited; }