]> git.proxmox.com Git - mirror_qemu.git/commit - blockdev.c
blockdev: fix drive-backup transaction endless drained section
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 8 Jun 2021 17:18:52 +0000 (10:18 -0700)
committerKevin Wolf <kwolf@redhat.com>
Fri, 9 Jul 2021 10:26:05 +0000 (12:26 +0200)
commit2842ff2d81ddd86b1d0dd3b98c46b72bfa5cb4cb
tree96979ef48cf920729690e2fa98f038d3ce04de7a
parent84affad1fd4c5251d7cccf4df43b29e9157983a9
blockdev: fix drive-backup transaction endless drained section

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