void bdrv_attach_aio_context(BlockDriverState *bs,

                             AioContext *new_context)

{

    BdrvAioNotifier *ban;



    if (!bs->drv) {

        return;

    }



    bs->aio_context = new_context;



    if (bs->backing) {

        bdrv_attach_aio_context(bs->backing->bs, new_context);

    }

    if (bs->file) {

        bdrv_attach_aio_context(bs->file->bs, new_context);

    }

    if (bs->drv->bdrv_attach_aio_context) {

        bs->drv->bdrv_attach_aio_context(bs, new_context);

    }

    if (bs->io_limits_enabled) {

        throttle_timers_attach_aio_context(&bs->throttle_timers, new_context);

    }



    QLIST_FOREACH(ban, &bs->aio_notifiers, list) {

        ban->attached_aio_context(new_context, ban->opaque);

    }

}

void bdrv_attach_aio_context(BlockDriverState *bs,

                             AioContext *new_context)

{

    BdrvAioNotifier *ban;



    if (!bs->drv) {

        return;

    }



    bs->aio_context = new_context;



    if (bs->backing) {

        bdrv_attach_aio_context(bs->backing->bs, new_context);

    }

    if (bs->file) {

        bdrv_attach_aio_context(bs->file->bs, new_context);

    }

    if (bs->drv->bdrv_attach_aio_context) {

        bs->drv->bdrv_attach_aio_context(bs, new_context);

    }

    if (bs->io_limits_enabled) {

        throttle_timers_attach_aio_context(&bs->throttle_timers, new_context);

    }



    QLIST_FOREACH(ban, &bs->aio_notifiers, list) {

        ban->attached_aio_context(new_context, ban->opaque);

    }

}

void FUNC_0(BlockDriverState *VAR_0,

                             AioContext *VAR_1)

{

    BdrvAioNotifier *ban;



    if (!VAR_0->drv) {

        return;

    }



    VAR_0->aio_context = VAR_1;



    if (VAR_0->backing) {

        FUNC_0(VAR_0->backing->VAR_0, VAR_1);

    }

    if (VAR_0->file) {

        FUNC_0(VAR_0->file->VAR_0, VAR_1);

    }

    if (VAR_0->drv->FUNC_0) {

        VAR_0->drv->FUNC_0(VAR_0, VAR_1);

    }

    if (VAR_0->io_limits_enabled) {

        throttle_timers_attach_aio_context(&VAR_0->throttle_timers, VAR_1);

    }



    QLIST_FOREACH(ban, &VAR_0->aio_notifiers, list) {

        ban->attached_aio_context(VAR_1, ban->opaque);

    }

}

void FUNC_0(BlockDriverState *VAR_0,
AioContext *VAR_1)
{ BdrvAioNotifier *ban; if (!VAR_0->drv) { return; } VAR_0->aio_context = VAR_1; if (VAR_0->backing) { FUNC_0(VAR_0->backing->VAR_0, VAR_1); } if (VAR_0->file) { FUNC_0(VAR_0->file->VAR_0, VAR_1); } if (VAR_0->drv->FUNC_0) { VAR_0->drv->FUNC_0(VAR_0, VAR_1); } if (VAR_0->io_limits_enabled) { throttle_timers_attach_aio_context(&VAR_0->throttle_timers, VAR_1); } QLIST_FOREACH(ban, &VAR_0->aio_notifiers, list) { ban->attached_aio_context(VAR_1, ban->opaque); } }