Changes since version 3.397: Revision 3.408 Bug fix for clobbering of buffer. "tfile" needed to be bigger, as its address was loaded into filearray[] and then that was overwritten by the mfflag causing parsed names to get loaded. Revision 3.407 Work around for cache_line_size suddenly becoming zero and breaking fetchit() Revision 3.406 Increase buffer size for configuration lines. They might be 700 chars long. Revision 3.405 Reduce CPU consumption in the op_rate control mechanism. Revision 3.404 Fix type-oh in usage message. Revision 3.403 Add -+W to permit chid_skew. This permits adding files, and continuing the proper sharing/dedup within each quadrant, within same seed group and with previously existing files that were created with a different number of threads. Revision 3.402 Mods for DragonFly support. Revision 3.401 bug fix for re-write rec. Revision 3.398 Adding thread_read_test and thread_write_test.
85 lines
2.8 KiB
Text
85 lines
2.8 KiB
Text
$NetBSD: patch-ab,v 1.11 2012/06/07 15:57:20 asau Exp $
|
|
|
|
--- iozone.c.orig 2012-05-10 05:14:12.000000000 +0000
|
|
+++ iozone.c
|
|
@@ -70,7 +70,7 @@
|
|
#include <windows.h>
|
|
#include <errno.h>
|
|
#else
|
|
-#if defined(linux) || defined(solaris) || defined(macosx) || defined(__AIX__) || defined(FreeBSD) || defined(_HPUX_SOURCE) || defined(__OpenBSD__) || defined(__DragonFly__)
|
|
+#if defined(linux) || defined(solaris) || defined(macosx) || defined(__AIX__) || defined(__FreeBSD__) || defined(_HPUX_SOURCE) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
|
|
#include <errno.h>
|
|
#else
|
|
extern int errno; /* imported for errors */
|
|
@@ -288,7 +288,7 @@ THISVERSION,
|
|
#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__APPLE__) && !defined(__DragonFly__)
|
|
#include <malloc.h>
|
|
#endif
|
|
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__)
|
|
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__NetBSD__)
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#endif
|
|
@@ -299,7 +299,7 @@ THISVERSION,
|
|
#endif
|
|
#endif
|
|
|
|
-#if defined (__FreeBSD__) || defined(__DSragonFly__)
|
|
+#if defined (__FreeBSD__) || defined(__DragonFly__)
|
|
#ifndef O_RSYNC
|
|
#define O_RSYNC O_FSYNC
|
|
#endif
|
|
@@ -444,6 +444,9 @@ struct piovec piov[PVECMAX];
|
|
struct iovec piov[PVECMAX];
|
|
#define piov_base iov_base
|
|
#define piov_len iov_len
|
|
+#if defined (__DragonFly__)
|
|
+#define DFLY_VECTOR_OFFSET
|
|
+#endif
|
|
#endif
|
|
|
|
#endif
|
|
@@ -7363,7 +7366,11 @@ long long *data2;
|
|
if(odsync)
|
|
file_flags |= O_DSYNC;
|
|
#endif
|
|
-#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__) || defined(__DragonFly__)
|
|
+#if defined (__DragonFly__)
|
|
+ if(read_sync)
|
|
+ file_flags |= O_SYNC;
|
|
+#endif
|
|
+#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__)
|
|
if(read_sync)
|
|
file_flags |=O_RSYNC|O_SYNC;
|
|
#endif
|
|
@@ -10585,7 +10592,11 @@ long long *data1, *data2;
|
|
open_flags |=O_DIRECTIO;
|
|
#endif
|
|
#endif
|
|
-#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__) || defined(__DragonFly__)
|
|
+#if defined (__DragonFly__)
|
|
+ if(read_sync)
|
|
+ open_flags |= O_SYNC;
|
|
+#endif
|
|
+#if defined(_HPUX_SOURCE) || defined(linux) || defined(__FreeBSD__)
|
|
if(read_sync)
|
|
open_flags |=O_RSYNC|O_SYNC;
|
|
#endif
|
|
@@ -10941,7 +10952,7 @@ long long *data1,*data2;
|
|
purgeit(piov[xx].piov_base,reclen);
|
|
}
|
|
if(pwritev(fd, piov,numvecs
|
|
-#ifndef PER_VECTOR_OFFSET
|
|
+#if defined(PER_VECTOR_OFFSET) || defined(DFLY_VECTOR_OFFSET)
|
|
, list_off[0]
|
|
#endif
|
|
) != (reclen*numvecs))
|
|
@@ -11268,7 +11279,7 @@ long long *data1,*data2;
|
|
purgeit(piov[xx].piov_base,reclen);
|
|
}
|
|
if(preadv(fd, piov, numvecs
|
|
-#ifndef PER_VECTOR_OFFSET
|
|
+#if defined(PER_VECTOR_OFFSET) || defined(DFLY_VECTOR_OFFSET)
|
|
, list_off[0]
|
|
#endif
|
|
) != (numvecs * reclen))
|