[sheepdog] [PATCH v2 2/6] vditest: don't flush when '-f 0' is specified
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Mon Feb 4 10:54:09 CET 2013
We can use '-f 1' to flush every write, so let's use '-f 0' as an
option to avoid flushing.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
script/vditest | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/script/vditest b/script/vditest
index 7876958..5f8f2e5 100755
--- a/script/vditest
+++ b/script/vditest
@@ -30,7 +30,7 @@ my $seek_pattern = "linear";
my $seed = time();
my ($sblk, $eblk) = (0, 0);
my $file = 0;
-my $flush_interval = -1;
+my $flush_interval = 0;
my $verbose = 0;
my ($read_test, $write_test) = (0,0);
my $hbeat = 0;
@@ -378,11 +378,7 @@ sub vdi_main {
%written_data = () if %written_data > 1000000;
- if ($flush_interval == 0) {
- vdi_flush();
- } elsif ($flush_interval > 0 && $i % $flush_interval == 0) {
- vdi_flush();
- }
+ vdi_flush() if $flush_interval > 0 && $i % $flush_interval == 0;
($sec, $microsec) = gettimeofday();
$cur_time = $sec * 1000000 + $microsec;
--
1.7.2.5
More information about the sheepdog
mailing list