[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 34/34] backup-top: Begin drain earlier
From: |
Max Reitz |
Subject: |
[PULL 34/34] backup-top: Begin drain earlier |
Date: |
Mon, 6 Jan 2020 15:42:06 +0100 |
When dropping backup-top, we need to drain the node before freeing the
BlockCopyState. Otherwise, requests may still be in flight and then the
assertion in shres_destroy() will fail.
(This becomes visible in intermittent failure of 056.)
Cc: address@hidden
Signed-off-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
block/backup-top.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/backup-top.c b/block/backup-top.c
index 7cdb1f8eba..818d3f26b4 100644
--- a/block/backup-top.c
+++ b/block/backup-top.c
@@ -257,12 +257,12 @@ void bdrv_backup_top_drop(BlockDriverState *bs)
BDRVBackupTopState *s = bs->opaque;
AioContext *aio_context = bdrv_get_aio_context(bs);
- block_copy_state_free(s->bcs);
-
aio_context_acquire(aio_context);
bdrv_drained_begin(bs);
+ block_copy_state_free(s->bcs);
+
s->active = false;
bdrv_child_refresh_perms(bs, bs->backing, &error_abort);
bdrv_replace_node(bs, backing_bs(bs), &error_abort);
--
2.24.1
- [PULL 24/34] iotests: Make 091 work with data_file, (continued)
- [PULL 24/34] iotests: Make 091 work with data_file, Max Reitz, 2020/01/06
- [PULL 25/34] iotests: Make 110 work with data_file, Max Reitz, 2020/01/06
- [PULL 26/34] iotests: Make 137 work with data_file, Max Reitz, 2020/01/06
- [PULL 27/34] iotests: Make 198 work with data_file, Max Reitz, 2020/01/06
- [PULL 29/34] iotests: Allow check -o data_file, Max Reitz, 2020/01/06
- [PULL 28/34] iotests: Disable data_file where it cannot be used, Max Reitz, 2020/01/06
- [PULL 31/34] qcow2: Allow writing compressed data of multiple clusters, Max Reitz, 2020/01/06
- [PULL 30/34] block: introduce compress filter driver, Max Reitz, 2020/01/06
- [PULL 33/34] tests/qemu-iotests: Update tests to recent desugarized -accel option, Max Reitz, 2020/01/06
- [PULL 32/34] tests/qemu-iotests: add case to write compressed data of multiple clusters, Max Reitz, 2020/01/06
- [PULL 34/34] backup-top: Begin drain earlier,
Max Reitz <=
- Re: [PULL 00/34] Block patches, Peter Maydell, 2020/01/06