[sheepdog] [PATCH 01/10] vditest: use qemu-io '-t' option to specify cache mode

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Mon Oct 22 04:54:04 CEST 2012


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 script/vditest |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/script/vditest b/script/vditest
index 89c6ab3..7289b1d 100755
--- a/script/vditest
+++ b/script/vditest
@@ -88,18 +88,7 @@ sub vdi_open {
 
     return  if $no_act;
 
-    switch ($cache) {
-	case 'none' {
-	    $cmd = "| qemu-io -n sheepdog:$vdiname";
-	}
-	case 'writeback' {
-	    # BDRV_O_CACHE_WB option is not suported by qemu-io
-	    $cmd = "| qemu-io sheepdog:$vdiname";
-	}
-	case 'writethrough' {
-	    $cmd = "| qemu-io sheepdog:$vdiname";
-	}
-    }
+    $cmd = "| qemu-io -t $cache sheepdog:$vdiname";
 
     open QEMU, $cmd or die "cannot run qemu-io\n"  if !$no_act;
 }
-- 
1.7.2.5




More information about the sheepdog mailing list