893f7ebafe
This patch adds the implementation of a new job that mirrors a disk to a new image while letting the guest continue using the old image. The target is treated as a "black box" and data is copied from the source to the target in the background. This can be used for several purposes, including storage migration, continuous replication, and observation of the guest I/O in an external program. It is also a first step in replacing the inefficient block migration code that is part of QEMU. The job is possibly never-ending, but it is logically structured into two phases: 1) copy all data as fast as possible until the target first gets in sync with the source; 2) keep target in sync and ensure that reopening to the target gets a correct (full) copy of the source data. The second phase is indicated by the progress in "info block-jobs" reporting the current offset to be equal to the length of the file. When the job is cancelled in the second phase, QEMU will run the job until the source is clean and quiescent, then it will report successful completion of the job. In other words, the BLOCK_JOB_CANCELLED event means that the target may _not_ be consistent with a past state of the source; the BLOCK_JOB_COMPLETED event means that the target is consistent with a past state of the source. (Note that it could already happen that management lost the race against QEMU and got a completion event instead of cancellation). It is not yet possible to complete the job and switch over to the target disk. The next patches will fix this and add many refinements to the basic idea introduced here. These include improved error management, some tunable knobs and performance optimizations. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
16 lines
647 B
Makefile
16 lines
647 B
Makefile
block-obj-y += raw.o cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
|
|
block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o
|
|
block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
|
|
block-obj-y += qed-check.o
|
|
block-obj-y += parallels.o nbd.o blkdebug.o sheepdog.o blkverify.o
|
|
block-obj-$(CONFIG_WIN32) += raw-win32.o
|
|
block-obj-$(CONFIG_POSIX) += raw-posix.o
|
|
block-obj-$(CONFIG_LIBISCSI) += iscsi.o
|
|
block-obj-$(CONFIG_CURL) += curl.o
|
|
block-obj-$(CONFIG_RBD) += rbd.o
|
|
block-obj-$(CONFIG_GLUSTERFS) += gluster.o
|
|
|
|
common-obj-y += stream.o
|
|
common-obj-y += commit.o
|
|
common-obj-y += mirror.o
|