mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
mirror: allow customizing the granularity
The desired granularity may be very different depending on the kind of operation (e.g. continuous replication vs. collapse-to-raw) and whether the VM is expected to perform lots of I/O while mirroring is in progress. Allow the user to customize it, while providing a sane default so that in general there will be no extra allocated space in the target compared to the source. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
50717e941b
commit
eee13dfe30
6 changed files with 64 additions and 24 deletions
|
@ -938,7 +938,8 @@ EQMP
|
|||
{
|
||||
.name = "drive-mirror",
|
||||
.args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
|
||||
"on-source-error:s?,on-target-error:s?",
|
||||
"on-source-error:s?,on-target-error:s?,"
|
||||
"granularity:i?",
|
||||
.mhandler.cmd_new = qmp_marshal_input_drive_mirror,
|
||||
},
|
||||
|
||||
|
@ -962,6 +963,7 @@ Arguments:
|
|||
file/device (NewImageMode, optional, default 'absolute-paths')
|
||||
- "speed": maximum speed of the streaming job, in bytes per second
|
||||
(json-int)
|
||||
- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
|
||||
- "sync": what parts of the disk image should be copied to the destination;
|
||||
possibilities include "full" for all the disk, "top" for only the sectors
|
||||
allocated in the topmost image, or "none" to only replicate new I/O
|
||||
|
@ -971,6 +973,10 @@ Arguments:
|
|||
- "on-target-error": the action to take on an error on the target
|
||||
(BlockdevOnError, default 'report')
|
||||
|
||||
The default value of the granularity is the image cluster size clamped
|
||||
between 4096 and 65536, if the image format defines one. If the format
|
||||
does not define a cluster size, the default value of the granularity
|
||||
is 65536.
|
||||
|
||||
|
||||
Example:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue