qemu-img rebase: Fix for undersized backing files
commit5bb37d151b026759ee35f04212b11b4d625c7431
authorKevin Wolf <kwolf@redhat.com>
Wed, 7 Dec 2011 11:42:10 +0000 (7 12:42 +0100)
committerJustin M. Forbes <jforbes@redhat.com>
Tue, 10 Jan 2012 19:36:51 +0000 (10 13:36 -0600)
tree2e7cb1b1be4d9b12734f157ad2261a7cf43393a6
parentfe5c13ebf1161d0f324229cfb36cb5fb87ec6248
qemu-img rebase: Fix for undersized backing files

Backing files may be smaller than the corresponding COW file. When
reading directly from the backing file, qemu-img rebase must consider
this and assume zero sectors after the end of backing files.

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