void blk_remove_bs(BlockBackend *blk)

{

    assert(blk->root->bs->blk == blk);



    notifier_list_notify(&blk->remove_bs_notifiers, blk);

    if (blk->public.throttle_state) {

        throttle_timers_detach_aio_context(&blk->public.throttle_timers);

    }



    blk_update_root_state(blk);



    blk->root->bs->blk = NULL;

    bdrv_root_unref_child(blk->root);

    blk->root = NULL;

}

void blk_remove_bs(BlockBackend *blk)

{

    assert(blk->root->bs->blk == blk);



    notifier_list_notify(&blk->remove_bs_notifiers, blk);

    if (blk->public.throttle_state) {

        throttle_timers_detach_aio_context(&blk->public.throttle_timers);

    }



    blk_update_root_state(blk);



    blk->root->bs->blk = NULL;

    bdrv_root_unref_child(blk->root);

    blk->root = NULL;

}

void FUNC_0(BlockBackend *VAR_0)

{

    assert(VAR_0->root->bs->VAR_0 == VAR_0);



    notifier_list_notify(&VAR_0->remove_bs_notifiers, VAR_0);

    if (VAR_0->public.throttle_state) {

        throttle_timers_detach_aio_context(&VAR_0->public.throttle_timers);

    }



    blk_update_root_state(VAR_0);



    VAR_0->root->bs->VAR_0 = NULL;

    bdrv_root_unref_child(VAR_0->root);

    VAR_0->root = NULL;

}

void FUNC_0(BlockBackend *VAR_0)
{ assert(VAR_0->root->bs->VAR_0 == VAR_0); notifier_list_notify(&VAR_0->remove_bs_notifiers, VAR_0); if (VAR_0->public.throttle_state) { throttle_timers_detach_aio_context(&VAR_0->public.throttle_timers); } blk_update_root_state(VAR_0); VAR_0->root->bs->VAR_0 = NULL; bdrv_root_unref_child(VAR_0->root); VAR_0->root = NULL; }