diff options
| author | Jeff Cody | 2015-10-01 06:06:37 +0200 |
|---|---|---|
| committer | Jeff Cody | 2015-10-01 21:02:21 +0200 |
| commit | 5279efebcf8f8fbf2ed2feed63cdb9d375c7cd07 (patch) | |
| tree | d2118bda8416c830f444fc21ca671c73e2c2a11e /include/exec/cpu-common.h | |
| parent | Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150930' i... (diff) | |
| download | qemu-5279efebcf8f8fbf2ed2feed63cdb9d375c7cd07.tar.gz qemu-5279efebcf8f8fbf2ed2feed63cdb9d375c7cd07.tar.xz qemu-5279efebcf8f8fbf2ed2feed63cdb9d375c7cd07.zip | |
block: mirror - fix full sync mode when target does not support zero init
During mirror, if the target device does not support zero init, a
mirror may result in a corrupted image for sync="full" mode.
This is due to how the initial dirty bitmap is set up prior to copying
data - we did not mark sectors as dirty that are unallocated. This
means those unallocated sectors are skipped over on the target, and for
a device without zero init, invalid data may reside in those holes.
If both of the following conditions are true, then we will explicitly
mark all sectors as dirty:
1.) sync = "full"
2.) bdrv_has_zero_init(target) == false
If the target does support zero init, but a target image is passed in
with data already present (i.e. an "existing" image), it is assumed the
data present in the existing image is valid data for those sectors.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 91ed4bc5bda7e2b09eb508b07c83f4071fe0b3c9.1443705220.git.jcody@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'include/exec/cpu-common.h')
0 files changed, 0 insertions, 0 deletions
