From: Stefan Hajnoczi <stefanha@redhat.com>
To: Manos Pitsidianakis <el13635@mail.ntua.gr>
Cc: qemu-devel <qemu-devel@nongnu.org>,
qemu-block <qemu-block@nongnu.org>,
Alberto Garcia <berto@igalia.com>, Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 4/7] block: remove legacy I/O throttling
Date: Tue, 5 Sep 2017 15:42:02 +0100 [thread overview]
Message-ID: <20170905144202.GS17449@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170825132332.6734-5-el13635@mail.ntua.gr>
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);
next prev parent reply other threads:[~2017-09-05 14:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 13:23 [Qemu-devel] [PATCH v3 0/6] block: remove legacy I/O throttling Manos Pitsidianakis
2017-08-25 13:23 ` [Qemu-devel] [PATCH v3 1/7] block: skip implicit nodes in snapshots, blockjobs Manos Pitsidianakis
2017-08-28 11:40 ` Alberto Garcia
2017-09-07 10:04 ` Kevin Wolf
2017-08-25 13:23 ` [Qemu-devel] [PATCH v3 2/7] block: add options parameter to bdrv_new_open_driver() Manos Pitsidianakis
2017-09-07 12:12 ` Kevin Wolf
2017-08-25 13:23 ` [Qemu-devel] [PATCH v3 3/7] block: require job-id when device is a node name Manos Pitsidianakis
2017-08-28 11:52 ` Alberto Garcia
2017-09-07 12:24 ` Kevin Wolf
2017-08-25 13:23 ` [Qemu-devel] [PATCH v3 4/7] block: remove legacy I/O throttling Manos Pitsidianakis
2017-08-28 12:00 ` Alberto Garcia
2017-09-05 14:42 ` Stefan Hajnoczi [this message]
2017-09-07 13:26 ` Kevin Wolf
2017-09-08 15:44 ` Manos Pitsidianakis
2017-09-08 16:00 ` Kevin Wolf
2017-09-08 17:47 ` Manos Pitsidianakis
2017-08-25 13:23 ` [Qemu-devel] [PATCH v3 5/7] block/throttle-groups.c: remove throttle-groups list Manos Pitsidianakis
2017-08-28 13:51 ` Alberto Garcia
2017-08-25 13:23 ` [Qemu-devel] [PATCH v3 6/7] block: remove BlockBackendPublic Manos Pitsidianakis
2017-08-25 13:23 ` [Qemu-devel] [PATCH v3 7/7] qemu-iotests: add 191 for legacy throttling interface Manos Pitsidianakis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170905144202.GS17449@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=berto@igalia.com \
--cc=el13635@mail.ntua.gr \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).