[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v2 13/13] block: Don't check throttled reqs in bdrv_
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH v2 13/13] block: Don't check throttled reqs in bdrv_requests_pending() |
Date: |
Fri, 22 Apr 2016 19:42:42 +0200 |
Checking whether there are throttled requests requires going to the
associated BlockBackend, which we want to avoid. All users of
bdrv_requests_pending() already call bdrv_parent_drained_begin() first,
which restarts all throttled requests, so no throttled requests can be
left here and this is removal of dead code.
Signed-off-by: Kevin Wolf <address@hidden>
---
block/io.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/block/io.c b/block/io.c
index b239e97..4224044 100644
--- a/block/io.c
+++ b/block/io.c
@@ -177,17 +177,10 @@ void bdrv_disable_copy_on_read(BlockDriverState *bs)
bool bdrv_requests_pending(BlockDriverState *bs)
{
BdrvChild *child;
- BlockBackendPublic *blkp = bs->blk ? blk_get_public(bs->blk) : NULL;
if (!QLIST_EMPTY(&bs->tracked_requests)) {
return true;
}
- if (blkp && !qemu_co_queue_empty(&blkp->throttled_reqs[0])) {
- return true;
- }
- if (blkp && !qemu_co_queue_empty(&blkp->throttled_reqs[1])) {
- return true;
- }
QLIST_FOREACH(child, &bs->children, next) {
if (bdrv_requests_pending(child->bs)) {
--
1.8.3.1
- [Qemu-block] [PATCH v2 03/13] block: throttle-groups: Use BlockBackend pointers internally, (continued)
- [Qemu-block] [PATCH v2 03/13] block: throttle-groups: Use BlockBackend pointers internally, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 04/13] block: Convert throttle_group_get_name() to BlockBackend, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 06/13] block: Move actual I/O throttling to BlockBackend, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 05/13] block: Move throttling fields from BDS to BB, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 07/13] block: Move I/O throttling configuration functions to BlockBackend, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 08/13] block: Introduce BdrvChild.opaque, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 10/13] block: Decouple throttling from BlockDriverState, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 09/13] block: Drain throttling queue with BdrvChild callback, Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 11/13] block: Remove bdrv_move_feature_fields(), Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 12/13] Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6", Kevin Wolf, 2016/04/22
- [Qemu-block] [PATCH v2 13/13] block: Don't check throttled reqs in bdrv_requests_pending(),
Kevin Wolf <=
- Re: [Qemu-block] [PATCH v2 00/13] block: Move I/O throttling to BlockBackend, Kevin Wolf, 2016/04/29