summaryrefslogtreecommitdiffstats
path: root/blockdev.c
diff options
context:
space:
mode:
authorAnthony Liguori2013-07-15 21:00:32 +0200
committerAnthony Liguori2013-07-15 21:00:32 +0200
commit5699a02e01a4d046652bc6e77abd67e887ae209c (patch)
tree9b5f353025bb767ad0fbf10fc9d6488be7831b13 /blockdev.c
parentioport: remove LITTLE_ENDIAN mark for portio (diff)
parentahci: Fix FLUSH command (diff)
downloadqemu-5699a02e01a4d046652bc6e77abd67e887ae209c.tar.gz
qemu-5699a02e01a4d046652bc6e77abd67e887ae209c.tar.xz
qemu-5699a02e01a4d046652bc6e77abd67e887ae209c.zip
Merge remote-tracking branch 'kwolf/for-anthony' into staging
# By Kevin Wolf (6) and Stefan Hajnoczi (2) # Via Kevin Wolf * kwolf/for-anthony: ahci: Fix FLUSH command migration: Fail migration on bdrv_flush_all() error cpus: Add return value for vm_stop() block: Add return value for bdrv_flush_all() qemu-iotests: Update 051 reference output block: Don't parse protocol from file.filename block: add drive_backup HMP command blockdev: add sync mode to drive-backup QMP command Message-id: 1373887000-4488-1-git-send-email-kwolf@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c
index b3a57e0c1d..c5abd65182 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -936,6 +936,7 @@ static void drive_backup_prepare(BlkTransactionState *common, Error **errp)
qmp_drive_backup(backup->device, backup->target,
backup->has_format, backup->format,
+ backup->sync,
backup->has_mode, backup->mode,
backup->has_speed, backup->speed,
backup->has_on_source_error, backup->on_source_error,
@@ -1421,6 +1422,7 @@ void qmp_block_commit(const char *device,
void qmp_drive_backup(const char *device, const char *target,
bool has_format, const char *format,
+ enum MirrorSyncMode sync,
bool has_mode, enum NewImageMode mode,
bool has_speed, int64_t speed,
bool has_on_source_error, BlockdevOnError on_source_error,
@@ -1435,6 +1437,10 @@ void qmp_drive_backup(const char *device, const char *target,
int64_t size;
int ret;
+ if (sync != MIRROR_SYNC_MODE_FULL) {
+ error_setg(errp, "only sync mode 'full' is currently supported");
+ return;
+ }
if (!has_speed) {
speed = 0;
}