]> www.infradead.org Git - users/hch/fsqual.git/commitdiff
Don't report "appending io" for prezero tests
authorAvi Kivity <avi@scylladb.com>
Tue, 5 Jan 2021 11:18:11 +0000 (13:18 +0200)
committerAvi Kivity <avi@scylladb.com>
Tue, 5 Jan 2021 11:18:11 +0000 (13:18 +0200)
These are overwrite tests; report them as such.

fsqual.cc

index 280cc9b335848ce5bd53d7381282e4c40c61d6a9..8b13bc00c050827bf5e7e79639a74fdd27fbdc2c 100644 (file)
--- a/fsqual.cc
+++ b/fsqual.cc
@@ -94,13 +94,15 @@ void run_test(unsigned iodepth, size_t bufsize, bool pretruncate, bool prezero,
     auto verdict = rate < 0.1 ? "GOOD" : "BAD";
     auto mode = std::string(pretruncate ? "size-unchanging" : "size-changing");
     if (prezero) {
-        mode += ", prezero";
+        mode += ", overwrite";
+    } else {
+        mode += ", append";
     }
     mode += ", blocksize " + std::to_string(bufsize);
     if (dsync) {
         mode += ", O_DSYNC";
     }
-    std::cout << "context switch per appending io (mode " << mode << ", iodepth " << iodepth << "): " << rate
+    std::cout << "context switch per io (mode " << mode << ", iodepth " << iodepth << "): " << rate
           << " (" << verdict << ")\n";
     auto ptr = mmap(nullptr, nr * 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
     auto incore = std::vector<uint8_t>(nr);