From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atf6u-0003fM-Ff for qemu-devel@nongnu.org; Fri, 22 Apr 2016 13:43:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atf6t-0006fM-GS for qemu-devel@nongnu.org; Fri, 22 Apr 2016 13:43:20 -0400 From: Kevin Wolf Date: Fri, 22 Apr 2016 19:42:41 +0200 Message-Id: <1461346962-4676-13-git-send-email-kwolf@redhat.com> In-Reply-To: <1461346962-4676-1-git-send-email-kwolf@redhat.com> References: <1461346962-4676-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH v2 12/13] Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, berto@igalia.com, mreitz@redhat.com, eblake@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org This reverts commit 76b223200ef4fb09dd87f0e213159795eb68e7a5. Now that I/O throttling is fully done on the BlockBackend level, there is no reason any more to block I/O throttling for nodes with multiple parents as the parents don't influence each other any more. Conflicts: block.c Signed-off-by: Kevin Wolf --- block.c | 6 ------ blockdev.c | 7 ------- 2 files changed, 13 deletions(-) diff --git a/block.c b/block.c index 32527dc..d8c6e98 100644 --- a/block.c +++ b/block.c @@ -1524,12 +1524,6 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename, return -ENODEV; } - if (blk_get_public(bs->blk)->throttle_state) { - error_setg(errp, "Cannot reference an existing block device for " - "which I/O throttling is enabled"); - return -EINVAL; - } - bdrv_ref(bs); *pbs = bs; return 0; diff --git a/blockdev.c b/blockdev.c index 337747e..7441212 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2652,13 +2652,6 @@ void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd, goto out; } - /* The BlockBackend must be the only parent */ - assert(QLIST_FIRST(&bs->parents)); - if (QLIST_NEXT(QLIST_FIRST(&bs->parents), next_parent)) { - error_setg(errp, "Cannot throttle device with multiple parents"); - goto out; - } - throttle_config_init(&cfg); cfg.buckets[THROTTLE_BPS_TOTAL].avg = bps; cfg.buckets[THROTTLE_BPS_READ].avg = bps_rd; -- 1.8.3.1