iotests/244: Test preallocation for data-file-raw
commit2ec7e8a94668efccf7f45634584cfa19a83fc553
authorMax Reitz <mreitz@redhat.com>
Fri, 26 Mar 2021 14:55:09 +0000 (26 15:55 +0100)
committerMax Reitz <mreitz@redhat.com>
Tue, 30 Mar 2021 11:02:11 +0000 (30 13:02 +0200)
tree723c027ab56341f946aad104127364e257bcf86d
parent484108293d94d80acd5a2f4332eaea5e2605947a
iotests/244: Test preallocation for data-file-raw

Three test cases:
(1) Adding a qcow2 (metadata) file to an existing data file, see whether
    we can read the existing data through the qcow2 image.
(2) Append data to the data file, grow the qcow2 image accordingly, see
    whether we can read the new data through the qcow2 image.
(3) At runtime, add a backing image to a freshly created qcow2 image
    with an external data file (with data-file-raw).  Reading data from
    the qcow2 image must return the same result as reading data from the
    data file, so everything in the backing image must be ignored.
    (This did not use to be the case, because without the L2 tables
    preallocated, all clusters would appear as unallocated, and so the
    qcow2 driver would fall through to the backing file.)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210326145509.163455-3-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/244
tests/qemu-iotests/244.out