[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 39/54] block: Fix pending requests check in bdrv_app
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PATCH 39/54] block: Fix pending requests check in bdrv_append() |
Date: |
Tue, 21 Feb 2017 15:58:35 +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>
---
block.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index c7c0a8b..a800e81 100644
--- a/block.c
+++ b/block.c
@@ -2874,8 +2874,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-block] [PATCH 31/54] blockjob: Add permissions to block_job_create(), (continued)
- [Qemu-block] [PATCH 31/54] blockjob: Add permissions to block_job_create(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 34/54] block: Add BdrvChildRole.stay_at_node, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 36/54] commit: Use real permissions in commit block job, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 35/54] blockjob: Add permissions to block_job_add_bdrv(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 37/54] commit: Use real permissions for HMP 'commit', Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 39/54] block: Fix pending requests check in bdrv_append(),
Kevin Wolf <=
- [Qemu-block] [PATCH 41/54] block: Allow backing file links in change_parent_backing_link(), Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 38/54] backup: Use real permissions in backup block job, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 40/54] block: BdrvChildRole.attach/detach() callbacks, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 42/54] mirror: Use real permissions in mirror/active commit block job, Kevin Wolf, 2017/02/21
- [Qemu-block] [PATCH 43/54] stream: Use real permissions in streaming block job, Kevin Wolf, 2017/02/21