void blk_remove_bs(BlockBackend *blk)

{

    BlockDriverState *bs;

    ThrottleTimers *tt;



    notifier_list_notify(&blk->remove_bs_notifiers, blk);

    if (blk->public.throttle_group_member.throttle_state) {

        tt = &blk->public.throttle_group_member.throttle_timers;

        bs = blk_bs(blk);

        bdrv_drained_begin(bs);

        throttle_timers_detach_aio_context(tt);

        bdrv_drained_end(bs);

    }



    blk_update_root_state(blk);



    bdrv_root_unref_child(blk->root);

    blk->root = NULL;

}

void blk_remove_bs(BlockBackend *blk)

{

    BlockDriverState *bs;

    ThrottleTimers *tt;



    notifier_list_notify(&blk->remove_bs_notifiers, blk);

    if (blk->public.throttle_group_member.throttle_state) {

        tt = &blk->public.throttle_group_member.throttle_timers;

        bs = blk_bs(blk);

        bdrv_drained_begin(bs);

        throttle_timers_detach_aio_context(tt);

        bdrv_drained_end(bs);

    }



    blk_update_root_state(blk);



    bdrv_root_unref_child(blk->root);

    blk->root = NULL;

}

    ThrottleTimers *tt;     if (blk->public.throttle_group_member.throttle_state) {         tt = &blk->public.throttle_group_member.throttle_timers;         throttle_timers_detach_aio_context(tt);     if (blk->public.throttle_group_member.throttle_state) {
void FUNC_0(BlockBackend *VAR_0)

{

    BlockDriverState *bs;

    ThrottleTimers *tt;



    notifier_list_notify(&VAR_0->remove_bs_notifiers, VAR_0);

    if (VAR_0->public.throttle_group_member.throttle_state) {

        tt = &VAR_0->public.throttle_group_member.throttle_timers;

        bs = blk_bs(VAR_0);

        bdrv_drained_begin(bs);

        throttle_timers_detach_aio_context(tt);

        bdrv_drained_end(bs);

    }



    blk_update_root_state(VAR_0);



    bdrv_root_unref_child(VAR_0->root);

    VAR_0->root = NULL;

}

void FUNC_0(BlockBackend *VAR_0)
{ BlockDriverState *bs; ThrottleTimers *tt; notifier_list_notify(&VAR_0->remove_bs_notifiers, VAR_0); if (VAR_0->public.throttle_group_member.throttle_state) { tt = &VAR_0->public.throttle_group_member.throttle_timers; bs = blk_bs(VAR_0); bdrv_drained_begin(bs); throttle_timers_detach_aio_context(tt); bdrv_drained_end(bs); } blk_update_root_state(VAR_0); bdrv_root_unref_child(VAR_0->root); VAR_0->root = NULL; }