]> git.ipfire.org Git - thirdparty/qemu.git/commit - block.c
block: perform zero-detection during copy-on-read
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Tue, 7 Feb 2012 13:27:26 +0000 (13:27 +0000)
committerKevin Wolf <kwolf@redhat.com>
Thu, 9 Feb 2012 15:17:50 +0000 (16:17 +0100)
commit79c053bde9fa40595670ae274d047da07f1df88c
treedc859b1ca2cb3345bdc665fca11f9c0cf4b35cf5
parentf08f2ddae078e8a7683f8b16da8e0cc3029c7b89
block: perform zero-detection during copy-on-read

Copy-on-Read populates the image file with data read from a backing
image.  In order to avoid bloating the image file when all zeroes are
read we should scan the buffer and perform an optimized zero write
operation.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c