qemu-e2k/tests/qemu-iotests/104.out
Hu Tao c2eb918e32 block: round up file size to nearest sector
Currently the file size requested by user is rounded down to nearest
sector, causing the actual file size could be a bit less than the size
user requested. Since some formats (like qcow2) record virtual disk
size in bytes, this can make the last few bytes cannot be accessed.

This patch fixes it by rounding up file size to nearest sector so that
the actual file size is no less than the requested file size.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-09-12 15:43:06 +02:00

13 lines
331 B
Plaintext

QA output created by 104
=== Check qemu-img info output ===
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1024
image: TEST_DIR/t.IMGFMT
file format: IMGFMT
virtual size: 1.0K (1024 bytes)
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1234
image: TEST_DIR/t.IMGFMT
file format: IMGFMT
virtual size: 1.5K (1536 bytes)
***done