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