[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3 4/7] block: remove legacy I/O throttling
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-block] [PATCH v3 4/7] block: remove legacy I/O throttling |
Date: |
Tue, 5 Sep 2017 15:42:02 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Fri, Aug 25, 2017 at 04:23:29PM +0300, Manos Pitsidianakis wrote:
> void blk_io_limits_disable(BlockBackend *blk)
> {
> - assert(blk->public.throttle_group_member.throttle_state);
> - bdrv_drained_begin(blk_bs(blk));
> - throttle_group_unregister_tgm(&blk->public.throttle_group_member);
> - bdrv_drained_end(blk_bs(blk));
> + BlockDriverState *bs, *throttle_node;
> +
> + throttle_node = blk_get_public(blk)->throttle_node;
> +
> + assert(throttle_node);
> +
> + bs = throttle_node->file->bs;
> + bdrv_drained_begin(bs);
> +
> + /* Ref throttle_node's child bs to ensure it won't go away */
> + bdrv_ref(bs);
Is this really necessary? bdrv_replace_node() also takes a temporary
reference:
bdrv_ref(to);
bdrv_replace_child_noperm(c, to);
bdrv_unref(from);
- Re: [Qemu-block] [PATCH v3 4/7] block: remove legacy I/O throttling,
Stefan Hajnoczi <=