]> Git Repo - qemu.git/commit - block/dmg.c
block/dmg: improve zeroes handling
authorPeter Wu <[email protected]>
Tue, 6 Jan 2015 17:48:15 +0000 (18:48 +0100)
committerKevin Wolf <[email protected]>
Fri, 6 Feb 2015 16:24:21 +0000 (17:24 +0100)
commit177b75104da3e3a9af84975c32a44782d903c41f
treea7c059a84c67cf93249d0ef8058fc47f964d878c
parent6b383c08c46468ecee98ecf71ffd8362e9bd7f42
block/dmg: improve zeroes handling

Disk images may contain large all-zeroes gaps (1.66k sectors or 812 MiB
is seen in the real world). These blocks (type 2) do not need to be
extracted into a temporary buffer, there is no need to allocate memory
for these blocks nor to check its length.

(For the test image, the maximum uncompressed size is 1054371 bytes,
probably for a bzip2-compressed block.)

Signed-off-by: Peter Wu <[email protected]>
Reviewed-by: John Snow <[email protected]>
Message-id: 1420566495[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/dmg.c
This page took 0.025317 seconds and 4 git commands to generate.