iotests/055: Use cache.no-flush for vmdk target
commit6a9d73bdd061d9eb7001d38147f73f4b6987f00b
authorKevin Wolf <kwolf@redhat.com>
Tue, 5 May 2020 06:46:18 +0000 (5 08:46 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 8 May 2020 11:26:35 +0000 (8 13:26 +0200)
tree45dc1402cf76606c6df3e0848480edc31862e458
parent0a82a9273062d05764e3df3637b3aa95ad8291c6
iotests/055: Use cache.no-flush for vmdk target

055 uses the backup block job to create a compressed backup of an
$IMGFMT image with both qcow2 and vmdk targets. However, cluster
allocation in vmdk is very slow because it flushes the image file after
each L2 update.

There is no reason why we need this level of safety in this test, so
let's disable flushes for vmdk. For the blockdev-backup tests this is
achieved by simply adding the cache.no-flush=on to the drive_add() for
the target. For drive-backup, the caching flags are copied from the
source node, so we'll also add the flag to the source node, even though
it is not vmdk.

This can make the test run significantly faster (though it doesn't make
a difference on tmpfs). In my usual setup it goes from ~45s to ~15s.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200505064618.16267-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/055