mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
block/backup: hoist bitmap check into QMP interface
This is nicer to do in the unified QMP interface that we have now, because it lets us use the right terminology back at the user. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 20190716000117.25219-5-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
10
blockdev.c
10
blockdev.c
@ -3529,6 +3529,16 @@ static BlockJob *do_backup_common(BackupCommon *backup,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((backup->sync == MIRROR_SYNC_MODE_BITMAP) ||
|
||||
(backup->sync == MIRROR_SYNC_MODE_INCREMENTAL)) {
|
||||
/* done before desugaring 'incremental' to print the right message */
|
||||
if (!backup->has_bitmap) {
|
||||
error_setg(errp, "must provide a valid bitmap name for "
|
||||
"'%s' sync mode", MirrorSyncMode_str(backup->sync));
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (backup->sync == MIRROR_SYNC_MODE_INCREMENTAL) {
|
||||
if (backup->has_bitmap_mode &&
|
||||
backup->bitmap_mode != BITMAP_SYNC_MODE_ON_SUCCESS) {
|
||||
|
Reference in New Issue
Block a user