Skip to contentSkip to conversation

qemu-iotests: Use cache=writeback in drive_add

PATCH In review Fam Zheng 2 participants 2 messages Nov 13, 2013

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

PATCH 1/1 qemu-iotests: Use cache=writeback in drive_add

This will allow running iotests on tmpfs, which is much faster, so we can run more tests.

---
 tests/qemu-iotests/iotests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/iotests.py +1 -1
index fb10ff4..c29314a 100644
@@ -96,7 +96,7 @@ class VM(object):
         '''Add a virtio-blk drive to the VM'''
         options = ['if=virtio',
                    'format=%s' % imgfmt,
-                   'cache=none',
+                   'cache=writeback',
                    'file=%s' % path,
                    'id=drive%d' % self._num_drives]
         if opts:
Signature · 1 line
1.8.4.2
#1 lore raw

Am 13.11.2013 um 13:27 hat Fam Zheng geschrieben:

Quoted 13 lines

This will allow running iotests on tmpfs, which is much faster, so we can run more tests.

---
 tests/qemu-iotests/iotests.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/iotests.py +0 -0
index fb10ff4..c29314a 100644

tests/qemu-iotests/iotests.py class VM(object): · line 102

Quoted 8 lines
tests/qemu-iotests/iotests.py +1 -1
@@ -96,7 +96,7 @@ class VM(object):
         '''Add a virtio-blk drive to the VM'''
         options = ['if=virtio',
                    'format=%s' % imgfmt,
-                   'cache=none',
+                   'cache=writeback',
                    'file=%s' % path,
                    'id=drive%d' % self._num_drives]
         if opts:

Well, in fact any fixed value is wrong here. By default, qemu-iotests is supposed to use cache=writethrough for everything, and ./check -nocache should make it cache=none. I think what we really want is a ./check option that allows specifying any cache option, and then we should make the scripts honour that option.

Kevin