mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
qapi: deprecate drive-backup
Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects that target will be opened in the same cache and aio mode as source. Corresponding logic is in drive_backup_prepare(), where we take bs->open_flags of source. It works rather bad if source was added by blockdev-add. Assume source is qcow2 image. On blockdev-add we should specify aio and cache options for file child of qcow2 node. What happens next: drive_backup_prepare() looks at bs->open_flags of qcow2 source node. But there no BDRV_O_NOCAHE neither BDRV_O_NATIVE_AIO: BDRV_O_NOCAHE is places in bs->file->bs->open_flags, and BDRV_O_NATIVE_AIO is nowhere, as file-posix parse options and simply set s->use_linux_aio. The documentation is updated in a minimal way, so that drive-backup is noted only as a deprecated command, and blockdev-backup used in most of places. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
24d6cc1fa1
commit
1084159b31
4 changed files with 51 additions and 18 deletions
|
@ -1709,6 +1709,9 @@
|
|||
# The operation can be stopped before it has completed using the
|
||||
# block-job-cancel command.
|
||||
#
|
||||
# Features:
|
||||
# @deprecated: This command is deprecated. Use @blockdev-backup instead.
|
||||
#
|
||||
# Returns: - nothing on success
|
||||
# - If @device is not a valid block device, GenericError
|
||||
#
|
||||
|
@ -1724,7 +1727,7 @@
|
|||
#
|
||||
##
|
||||
{ 'command': 'drive-backup', 'boxed': true,
|
||||
'data': 'DriveBackup' }
|
||||
'data': 'DriveBackup', 'features': ['deprecated'] }
|
||||
|
||||
##
|
||||
# @blockdev-backup:
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
# @blockdev-snapshot-sync: since 1.1
|
||||
# @drive-backup: Since 1.6
|
||||
#
|
||||
# Features:
|
||||
# @deprecated: Member @drive-backup is deprecated. Use member
|
||||
# @blockdev-backup instead.
|
||||
#
|
||||
# Since: 1.1
|
||||
##
|
||||
{ 'enum': 'TransactionActionKind',
|
||||
|
@ -62,7 +66,7 @@
|
|||
'block-dirty-bitmap-disable', 'block-dirty-bitmap-merge',
|
||||
'blockdev-backup', 'blockdev-snapshot',
|
||||
'blockdev-snapshot-internal-sync', 'blockdev-snapshot-sync',
|
||||
'drive-backup' ] }
|
||||
{ 'name': 'drive-backup', 'features': [ 'deprecated' ] } ] }
|
||||
|
||||
##
|
||||
# @AbortWrapper:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue