[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/31] block: Don't check throttled reqs in bdrv_requ
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 14/31] block: Don't check throttled reqs in bdrv_requests_pending() |
Date: |
Thu, 19 May 2016 17:21:52 +0200 |
Checking whether there are throttled requests requires going to the
associated BlockBackend, which we want to avoid.
All users of bdrv_requests_pending() in block/io.c 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.
The remaining users (assertions during graph manipulation in block.c)
don't care about requests that are still queued in the BlockBackend and
haven't been issued for a BlockDriverState yet.
Signed-off-by: Kevin Wolf <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
---
block/io.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/block/io.c b/block/io.c
index 23abbc5..6e90805 100644
--- a/block/io.c
+++ b/block/io.c
@@ -147,17 +147,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-devel] [PULL 00/31] Block layer patches, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 06/31] block: Move actual I/O throttling to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 01/31] block: Make sure throttled BDSes always have a BB, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 09/31] block: Drain throttling queue with BdrvChild callback, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 04/31] block: Convert throttle_group_get_name() to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 02/31] block: Introduce BlockBackendPublic, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 08/31] block: Introduce BdrvChild.opaque, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 03/31] block: throttle-groups: Use BlockBackend pointers internally, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 14/31] block: Don't check throttled reqs in bdrv_requests_pending(),
Kevin Wolf <=
- [Qemu-devel] [PULL 16/31] block: User BdrvChild callback for device name, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 07/31] block: Move I/O throttling configuration functions to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 12/31] block: Remove bdrv_move_feature_fields(), Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 05/31] block: Move throttling fields from BDS to BB, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 10/31] block/io: Quiesce parents between drained_begin/end, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 11/31] block: Decouple throttling from BlockDriverState, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 18/31] blockjob: Don't touch BDS iostatus, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 15/31] block: Use BdrvChild callbacks for change_media/resize, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 28/31] block: clarify error message for qmp-eject, Kevin Wolf, 2016/05/19
- [Qemu-devel] [PULL 25/31] qcow2: fix condition in is_zero_cluster, Kevin Wolf, 2016/05/19