[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/30] iotests/055: Use cache.no-flush for vmdk target
From: |
Kevin Wolf |
Subject: |
[PULL 20/30] iotests/055: Use cache.no-flush for vmdk target |
Date: |
Fri, 8 May 2020 14:41:25 +0200 |
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/055 | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/055 b/tests/qemu-iotests/055
index 7f8e630de3..4d3744b0d3 100755
--- a/tests/qemu-iotests/055
+++ b/tests/qemu-iotests/055
@@ -489,7 +489,7 @@ class TestSingleTransaction(iotests.QMPTestCase):
class TestCompressedToQcow2(iotests.QMPTestCase):
image_len = 64 * 1024 * 1024 # MB
- target_fmt = {'type': 'qcow2', 'args': ()}
+ target_fmt = {'type': 'qcow2', 'args': (), 'drive-opts': ''}
def tearDown(self):
self.vm.shutdown()
@@ -500,14 +500,16 @@ class TestCompressedToQcow2(iotests.QMPTestCase):
pass
def do_prepare_drives(self, attach_target):
- self.vm = iotests.VM().add_drive('blkdebug::' + test_img)
+ self.vm = iotests.VM().add_drive('blkdebug::' + test_img,
+ opts=self.target_fmt['drive-opts'])
qemu_img('create', '-f', self.target_fmt['type'], blockdev_target_img,
str(self.image_len), *self.target_fmt['args'])
if attach_target:
self.vm.add_drive(blockdev_target_img,
img_format=self.target_fmt['type'],
- interface="none")
+ interface="none",
+ opts=self.target_fmt['drive-opts'])
self.vm.launch()
@@ -601,7 +603,8 @@ class TestCompressedToQcow2(iotests.QMPTestCase):
class TestCompressedToVmdk(TestCompressedToQcow2):
- target_fmt = {'type': 'vmdk', 'args': ('-o', 'subformat=streamOptimized')}
+ target_fmt = {'type': 'vmdk', 'args': ('-o', 'subformat=streamOptimized'),
+ 'drive-opts': 'cache.no-flush=on'}
@iotests.skip_if_unsupported(['vmdk'])
def setUp(self):
--
2.25.3
- [PULL 05/30] iotests/055: refactor compressed backup to vmdk, (continued)
- [PULL 05/30] iotests/055: refactor compressed backup to vmdk, Kevin Wolf, 2020/05/08
- [PULL 08/30] iotests/113: mark bochs as required to support whitelisting, Kevin Wolf, 2020/05/08
- [PULL 10/30] vmdk: Rename VmdkMetaData.valid to new_allocation, Kevin Wolf, 2020/05/08
- [PULL 12/30] vmdk: Fix partial overwrite of zero cluster, Kevin Wolf, 2020/05/08
- [PULL 14/30] vmdk: Flush only once in vmdk_L2update(), Kevin Wolf, 2020/05/08
- [PULL 11/30] vmdk: Fix zero cluster allocation, Kevin Wolf, 2020/05/08
- [PULL 13/30] vmdk: Don't update L2 table for zero write on zero cluster, Kevin Wolf, 2020/05/08
- [PULL 09/30] qcow2: Avoid integer wraparound in qcow2_co_truncate(), Kevin Wolf, 2020/05/08
- [PULL 16/30] iotests/283: Use consistent size for source and target, Kevin Wolf, 2020/05/08
- [PULL 18/30] backup: Make sure that source and target size match, Kevin Wolf, 2020/05/08
- [PULL 20/30] iotests/055: Use cache.no-flush for vmdk target,
Kevin Wolf <=
- [PULL 15/30] iotests: vmdk: Enable zeroed_grained=on by default, Kevin Wolf, 2020/05/08
- [PULL 17/30] backup: Improve error for bdrv_getlength() failure, Kevin Wolf, 2020/05/08
- [PULL 26/30] sheepdog: Support BDRV_REQ_ZERO_WRITE for truncate, Kevin Wolf, 2020/05/08
- [PULL 30/30] block: Drop unused .bdrv_has_zero_init_truncate, Kevin Wolf, 2020/05/08
- [PULL 29/30] vhdx: Rework truncation logic, Kevin Wolf, 2020/05/08
- [PULL 21/30] qcow2: Fix preallocation on block devices, Kevin Wolf, 2020/05/08
- [PULL 23/30] file-win32: Support BDRV_REQ_ZERO_WRITE for truncate, Kevin Wolf, 2020/05/08
- [PULL 19/30] iotests: Backup with different source/target size, Kevin Wolf, 2020/05/08
- [PULL 25/30] rbd: Support BDRV_REQ_ZERO_WRITE for truncate, Kevin Wolf, 2020/05/08
- [PULL 27/30] ssh: Support BDRV_REQ_ZERO_WRITE for truncate, Kevin Wolf, 2020/05/08