virDomainBlockCopy: Introduce VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES flag

In cases when the destination storage is slower than the normal VM
storage and the VM does intensive I/O to the disk a block copy job may
never converge.

Switching it to synchronous mode will ensure that all writes done by the
guest are propagated to the destination at the cost of slowing down I/O
of the guest to the synchronous speed.

This patch adds the new API flag and implements virsh support.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2021-12-01 15:09:45 +01:00
parent b1fc1dbd1a
commit b54c313c33
4 changed files with 24 additions and 2 deletions

View File

@@ -2598,6 +2598,10 @@ typedef enum {
/* Don't force usage of recoverable job for the copy operation */
VIR_DOMAIN_BLOCK_COPY_TRANSIENT_JOB = 1 << 2,
/* Force the copy job to synchronously propagate guest writes into
* the destination image, so that the copy is guaranteed to converge */
VIR_DOMAIN_BLOCK_COPY_SYNCHRONOUS_WRITES = 1 << 3,
} virDomainBlockCopyFlags;
/**