[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 30/46] block: Fix pending requests check in bdrv_appe
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 30/46] block: Fix pending requests check in bdrv_append() |
Date: |
Tue, 28 Feb 2017 21:36:29 +0100 |
bdrv_append() cares about isolation of the node that it modifies, but
not about activity in some subtree below it. Instead of using the
recursive bdrv_requests_pending(), directly check bs->in_flight, which
considers only the node in question.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Acked-by: Fam Zheng <address@hidden>
---
block.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 9e538a5..5189c7c 100644
--- a/block.c
+++ b/block.c
@@ -2897,8 +2897,8 @@ static void change_parent_backing_link(BlockDriverState
*from,
*/
void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top)
{
- assert(!bdrv_requests_pending(bs_top));
- assert(!bdrv_requests_pending(bs_new));
+ assert(!atomic_read(&bs_top->in_flight));
+ assert(!atomic_read(&bs_new->in_flight));
bdrv_ref(bs_top);
--
1.8.3.1
- [Qemu-devel] [PULL 21/46] hw/block: Introduce share-rw qdev property, (continued)
- [Qemu-devel] [PULL 21/46] hw/block: Introduce share-rw qdev property, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 22/46] blockjob: Add permissions to block_job_create(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 23/46] block: Add BdrvChildRole.get_parent_desc(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 28/46] commit: Use real permissions for HMP 'commit', Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 25/46] block: Add BdrvChildRole.stay_at_node, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 29/46] backup: Use real permissions in backup block job, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 24/46] block: Include details on permission errors in message, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 27/46] commit: Use real permissions in commit block job, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 26/46] blockjob: Add permissions to block_job_add_bdrv(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 32/46] block: Allow backing file links in change_parent_backing_link(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 30/46] block: Fix pending requests check in bdrv_append(),
Kevin Wolf <=
- [Qemu-devel] [PULL 31/46] block: BdrvChildRole.attach/detach() callbacks, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 33/46] blockjob: Factor out block_job_remove_all_bdrv(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 35/46] stream: Use real permissions in streaming block job, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 36/46] mirror: Add filter-node-name to blockdev-mirror, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 37/46] commit: Add filter-node-name to block-commit, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 34/46] mirror: Use real permissions in mirror/active commit block job, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 39/46] migration/block: Use real permissions, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 38/46] hmp: Request permissions in qemu-io, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 40/46] nbd/server: Use real permissions for NBD exports, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PULL 41/46] tests: Remove FIXME comments, Kevin Wolf, 2017/02/28