← Back to team overview

sysbench-developers team mailing list archive

[Merge] lp:~ignacio-nin/sysbench/0.5-bug1262178 into lp:sysbench

 

Ignacio Nin has proposed merging lp:~ignacio-nin/sysbench/0.5-bug1262178 into lp:sysbench.

Requested reviews:
  Alexey Kopytov (akopytov)
Related bugs:
  Bug #1262178 in sysbench: "FATAL error fsyncing in fileio with mode=mmap"
  https://bugs.launchpad.net/sysbench/+bug/1262178

For more details, see:
https://code.launchpad.net/~ignacio-nin/sysbench/0.5-bug1262178/+merge/199448

Fix for bug #1262178

To test:
$ sysbench --test=fileio --file-num=1 --file-total-size=1M prepare
$ sysbench --test=fileio --file-num=1 --file-total-size=1M --file-io-mode=mmap --file-test-mode=seqwr run

-- 
https://code.launchpad.net/~ignacio-nin/sysbench/0.5-bug1262178/+merge/199448
Your team sysbench-developers is subscribed to branch lp:sysbench.
=== modified file 'sysbench/tests/fileio/sb_fileio.c'
--- sysbench/tests/fileio/sb_fileio.c	2013-07-04 06:28:56 +0000
+++ sysbench/tests/fileio/sb_fileio.c	2013-12-18 12:17:48 +0000
@@ -1502,9 +1502,9 @@
   else if (file_io_mode == FILE_IO_MODE_MMAP)
   {
 #ifndef _WIN32
-    msync(mmaps[file_id], file_size, MS_SYNC | MS_INVALIDATE);
+    return msync(mmaps[file_id], file_size, MS_SYNC | MS_INVALIDATE);
 #else
-    FlushViewOfFile(mmaps[file_id], (size_t)file_size);
+    return FlushViewOfFile(mmaps[file_id], (size_t)file_size);
 #endif
   }
 #endif


References