80f5c01183
A discard request deallocates the selected clusters so they read back as zeroes. This is done by clearing the cluster offset field and setting QCOW_OFLAG_ZERO in the L2 entry. This flag is however only supported when qcow_version >= 3. In older images the cluster is simply deallocated, exposing any possible stale data from the backing file. Since discard is an advisory operation it's safer to simply forbid it in this scenario. Note that we are adding this check to qcow2_co_pdiscard() and not to qcow2_cluster_discard() or discard_in_l2_slice() because the last two are also used by qcow2_snapshot_create() to discard the clusters used by the VM state. In this case there's no risk of exposing stale data to the guest and we really want that the clusters are always discarded. Signed-off-by: Alberto Garcia <berto@igalia.com> Message-Id: <20200331114345.29993-1-berto@igalia.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
244 lines
11 KiB
Plaintext
244 lines
11 KiB
Plaintext
QA output created by 046
|
|
|
|
== creating backing file for COW tests ==
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
|
wrote 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 65536
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 131072
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 196608
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 262144
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 327680
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 393216
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 458752
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 524288
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 589824
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 655360
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 720896
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 786432
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 851968
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 917504
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 983040
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1048576
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1114112
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1179648
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1245184
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1310720
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1376256
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1441792
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1507328
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1572864
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1638400
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1703936
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1769472
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1835008
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1900544
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 1966080
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset 2031616
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=6442450944 backing_file=TEST_DIR/t.IMGFMT.base
|
|
|
|
== Some concurrent requests touching the same cluster ==
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset XXX
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset XXX
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 32768/32768 bytes at offset XXX
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 57344/57344 bytes at offset XXX
|
|
56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 4096/4096 bytes at offset XXX
|
|
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 32768/32768 bytes at offset XXX
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
discard 65536/65536 bytes at offset XXX
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 57344/57344 bytes at offset XXX
|
|
56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 4096/4096 bytes at offset XXX
|
|
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 65536/65536 bytes at offset XXX
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
discard 65536/65536 bytes at offset XXX
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 57344/57344 bytes at offset XXX
|
|
56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 98304/98304 bytes at offset XXX
|
|
96 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 8192/8192 bytes at offset XXX
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 81920/81920 bytes at offset XXX
|
|
80 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
blkdebug: Suspended request 'A'
|
|
blkdebug: Resuming request 'A'
|
|
wrote 32768/32768 bytes at offset XXX
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
wrote 98304/98304 bytes at offset XXX
|
|
96 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
== Verify image content ==
|
|
read 65536/65536 bytes at offset 0
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 65536
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 73728
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 81920
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 98304
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 106496
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 114688
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 122880
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 32768/32768 bytes at offset 131072
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 163840
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 65536/65536 bytes at offset 172032
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 24576/24576 bytes at offset 237568
|
|
24 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 32768/32768 bytes at offset 262144
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 294912
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 303104
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 65536/65536 bytes at offset 311296
|
|
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 376832
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 24576/24576 bytes at offset 393216
|
|
24 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 417792
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 425984
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 57344/57344 bytes at offset 434176
|
|
56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 24576/24576 bytes at offset 491520
|
|
24 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 516096
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 4096/4096 bytes at offset 524288
|
|
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 20480/20480 bytes at offset 528384
|
|
20 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 548864
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 557056
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 57344/57344 bytes at offset 565248
|
|
56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 24576/24576 bytes at offset 622592
|
|
24 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 647168
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 4096/4096 bytes at offset 655360
|
|
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 20480/20480 bytes at offset 659456
|
|
20 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 679936
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 688128
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 57344/57344 bytes at offset 696320
|
|
56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 32768/32768 bytes at offset 753664
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 786432
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 98304/98304 bytes at offset 802816
|
|
96 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 901120
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 909312
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 917504
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 81920/81920 bytes at offset 933888
|
|
80 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 1015808
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 1032192
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 8192/8192 bytes at offset 1040384
|
|
8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 1048576
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 32768/32768 bytes at offset 1064960
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 32768/32768 bytes at offset 1130496
|
|
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
read 16384/16384 bytes at offset 1163264
|
|
16 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
No errors were found on the image.
|
|
*** done
|