[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 10/31] block/io: Quiesce parents between drained_begi
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 10/31] block/io: Quiesce parents between drained_begin/end |
Date: |
Thu, 19 May 2016 17:21:48 +0200 |
So far, bdrv_parent_drained_begin/end() was called for the duration of
the actual bdrv_drain() at the beginning of a drained section, but we
really should keep parents quiesced until the end of the drained
section.
This does not actually change behaviour at this point because the only
user of the .drained_begin/end BdrvChildRole callback is I/O throttling,
which already doesn't send any new requests after flushing its queue in
.drained_begin. The patch merely removes a trap for future users.
Reported-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Acked-by: Stefan Hajnoczi <address@hidden>
---
block/io.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/io.c b/block/io.c
index 7c213ec..23abbc5 100644
--- a/block/io.c
+++ b/block/io.c
@@ -2749,11 +2749,14 @@ void bdrv_drained_begin(BlockDriverState *bs)
if (!bs->quiesce_counter++) {
aio_disable_external(bdrv_get_aio_context(bs));
}
+ bdrv_parent_drained_begin(bs);
bdrv_drain(bs);
}
void bdrv_drained_end(BlockDriverState *bs)
{
+ bdrv_parent_drained_end(bs);
+
assert(bs->quiesce_counter > 0);
if (--bs->quiesce_counter > 0) {
return;
--
1.8.3.1
- [Qemu-block] [PULL 00/31] Block layer patches, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 06/31] block: Move actual I/O throttling to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 01/31] block: Make sure throttled BDSes always have a BB, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 02/31] block: Introduce BlockBackendPublic, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 04/31] block: Convert throttle_group_get_name() to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 03/31] block: throttle-groups: Use BlockBackend pointers internally, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 08/31] block: Introduce BdrvChild.opaque, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 07/31] block: Move I/O throttling configuration functions to BlockBackend, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 14/31] block: Don't check throttled reqs in bdrv_requests_pending(), Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 09/31] block: Drain throttling queue with BdrvChild callback, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 10/31] block/io: Quiesce parents between drained_begin/end,
Kevin Wolf <=
- [Qemu-block] [PULL 12/31] block: Remove bdrv_move_feature_fields(), Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 05/31] block: Move throttling fields from BDS to BB, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 16/31] block: User BdrvChild callback for device name, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 15/31] block: Use BdrvChild callbacks for change_media/resize, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 18/31] blockjob: Don't touch BDS iostatus, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 11/31] block: Decouple throttling from BlockDriverState, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 17/31] blockjob: Don't set iostatus of target, Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 19/31] block: Remove bdrv_aio_multiwrite(), Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 13/31] Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6", Kevin Wolf, 2016/05/19
- [Qemu-block] [PULL 26/31] qcow2: Fix write_zeroes with partially allocated backing file cluster, Kevin Wolf, 2016/05/19