]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commit
stream: do not copy unallocated sectors from the base
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 May 2012 14:51:58 +0000 (16:51 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 10 May 2012 09:01:59 +0000 (11:01 +0200)
commitefcc7a23242dd0fa05932383cf35c068d16e6bbf
treedf2f038701b076624b4192a8dc14ee1844ae7842
parentb21d677ee9efe431a4acc653a8cfb12650e44cec
stream: do not copy unallocated sectors from the base

Unallocated sectors should really never be accessed by the guest,
so there's no need to copy them during the streaming process.
If they are read by the guest during streaming, guest-initiated
copy-on-read will copy them (we're in the base == NULL case, which
enables copy on read).  If they are read after we disconnect the
image from the base, they will read as zeroes anyway.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/stream.c
tests/qemu-iotests/030