qmp: Add optional bool "unmap" to drive-mirror

If specified as "true", it allows discarding on target sectors where source is
not allocated.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Fam Zheng 2015-06-08 13:56:08 +08:00 committed by Stefan Hajnoczi
parent ba3f0e2545
commit 0fc9f8ea28
6 changed files with 24 additions and 4 deletions

2
hmp.c
View file

@ -1061,7 +1061,7 @@ void hmp_drive_mirror(Monitor *mon, const QDict *qdict)
false, NULL, false, NULL,
full ? MIRROR_SYNC_MODE_FULL : MIRROR_SYNC_MODE_TOP,
true, mode, false, 0, false, 0, false, 0,
false, 0, false, 0, &err);
false, 0, false, 0, false, true, &err);
hmp_handle_error(mon, &err);
}