[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/28] blockdev: fix drive-backup transaction endless drained sect
From: |
Kevin Wolf |
Subject: |
[PULL 19/28] blockdev: fix drive-backup transaction endless drained section |
Date: |
Fri, 9 Jul 2021 14:50:26 +0200 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
drive_backup_prepare() does bdrv_drained_begin() in hope that
bdrv_drained_end() will be called in drive_backup_clean(). Still we
need to set state->bs for this to work. That's done too late: a lot of
failure paths in drive_backup_prepare() miss setting state->bs. Fix
that.
Fixes: 2288ccfac96281c316db942d10e3f921c1373064
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/399
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210608171852.250775-1-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
blockdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index f08192deda..094c085962 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1714,6 +1714,7 @@ static void drive_backup_prepare(BlkActionState *common,
Error **errp)
aio_context = bdrv_get_aio_context(bs);
aio_context_acquire(aio_context);
+ state->bs = bs;
/* Paired with .clean() */
bdrv_drained_begin(bs);
@@ -1813,8 +1814,6 @@ static void drive_backup_prepare(BlkActionState *common,
Error **errp)
}
}
- state->bs = bs;
-
state->job = do_backup_common(qapi_DriveBackup_base(backup),
bs, target_bs, aio_context,
common->block_job_txn, errp);
--
2.31.1
- [PULL 08/28] block/rbd: drop qemu_rbd_refresh_limits, (continued)
- [PULL 08/28] block/rbd: drop qemu_rbd_refresh_limits, Kevin Wolf, 2021/07/09
- [PULL 10/28] export/fuse: Pass default_permissions for mount, Kevin Wolf, 2021/07/09
- [PULL 11/28] export/fuse: Add allow-other option, Kevin Wolf, 2021/07/09
- [PULL 12/28] export/fuse: Give SET_ATTR_SIZE its own branch, Kevin Wolf, 2021/07/09
- [PULL 13/28] export/fuse: Let permissions be adjustable, Kevin Wolf, 2021/07/09
- [PULL 14/28] iotests/308: Test +w on read-only FUSE exports, Kevin Wolf, 2021/07/09
- [PULL 15/28] iotests/fuse-allow-other: Test allow-other, Kevin Wolf, 2021/07/09
- [PULL 17/28] MAINTAINERS: add block/rbd.c reviewer, Kevin Wolf, 2021/07/09
- [PULL 16/28] block/rbd: fix type of task->complete, Kevin Wolf, 2021/07/09
- [PULL 18/28] vhost-user: Fix backends without multiqueue support, Kevin Wolf, 2021/07/09
- [PULL 19/28] blockdev: fix drive-backup transaction endless drained section,
Kevin Wolf <=
- [PULL 20/28] qcow2: Prohibit backing file changes in 'qemu-img amend', Kevin Wolf, 2021/07/09
- [PULL 21/28] qemu-img: Require -F with -b backing image, Kevin Wolf, 2021/07/09
- [PULL 23/28] qcow2: Fix dangling pointer after reopen for 'file', Kevin Wolf, 2021/07/09
- [PULL 24/28] block: Add bdrv_reopen_queue_free(), Kevin Wolf, 2021/07/09
- [PULL 22/28] qemu-img: Improve error for rebase without backing format, Kevin Wolf, 2021/07/09
- [PULL 25/28] block: Acquire AioContexts during bdrv_reopen_multiple(), Kevin Wolf, 2021/07/09
- [PULL 26/28] block: Support multiple reopening with x-blockdev-reopen, Kevin Wolf, 2021/07/09
- [PULL 27/28] iotests: Test reopening multiple devices at the same time, Kevin Wolf, 2021/07/09
- [PULL 28/28] block: Make blockdev-reopen stable API, Kevin Wolf, 2021/07/09
- Re: [PULL 00/28] Block layer patches, Peter Maydell, 2021/07/10