bs->total_sectors is not the highest possible sector number that could be involved in a copy on write operation: VM state is after the end of the virtual disk. This resulted in wrong values for the number of sectors to be copied (n). The code that checks for the end of the image isn't required any more because the code hasn't been calling the block layer's bdrv_read() for a long time; instead, it directly calls qcow2_readv(), which doesn't error out on VM state sector numbers. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
24 lines
833 B
Plaintext
24 lines
833 B
Plaintext
QA output created by 029
|
|
|
|
Test loading internal snapshots where the L1 table of the snapshot
|
|
is smaller than the current L1 table.
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
wrote 4096/4096 bytes at offset 0
|
|
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
No errors were found on the image.
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=16777216
|
|
wrote 4194304/4194304 bytes at offset 0
|
|
4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
No errors were found on the image.
|
|
|
|
Try using a huge VM state
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
wrote 4096/4096 bytes at offset 1099511627776
|
|
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 4096/4096 bytes at offset 1099511627776
|
|
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
No errors were found on the image.
|
|
*** done
|