diff options
| author | Sergio Lopez <slp@redhat.com> | 2020-01-08 15:31:33 +0100 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2020-01-27 17:19:53 +0100 |
| commit | 5b7bfe515ecbd584b40ff6e41d2fd8b37c7d5139 (patch) | |
| tree | de87e0650ead7dec536bd307153efa4c9bd68fe3 /hw/core/machine-qmp-cmds.c | |
| parent | 2288ccfac96281c316db942d10e3f921c1373064 (diff) | |
| download | focaccia-qemu-5b7bfe515ecbd584b40ff6e41d2fd8b37c7d5139.tar.gz focaccia-qemu-5b7bfe515ecbd584b40ff6e41d2fd8b37c7d5139.zip | |
blockdev: unify qmp_blockdev_backup and blockdev-backup transaction paths
Issuing a blockdev-backup from qmp_blockdev_backup takes a slightly different path than when it's issued from a transaction. In the code, this is manifested as some redundancy between do_blockdev_backup() and blockdev_backup_prepare(). This change unifies both paths, merging do_blockdev_backup() and blockdev_backup_prepare(), and changing qmp_blockdev_backup() to create a transaction instead of calling do_backup_common() direcly. As a side-effect, now qmp_blockdev_backup() is executed inside a drained section, as it happens when creating a blockdev-backup transaction. This change is visible from the user's perspective, as the job gets paused and immediately resumed before starting the actual work. Signed-off-by: Sergio Lopez <slp@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/core/machine-qmp-cmds.c')
0 files changed, 0 insertions, 0 deletions