projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix broken 'norandommap'
[fio.git]
/
init.c
diff --git
a/init.c
b/init.c
index da1f472db35111b806539fe38359aa19103bd2ed..29a50f22acde170f54258b72340162b622adebba 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-9,7
+9,9
@@
#include <string.h>
#include <errno.h>
#include <sys/ipc.h>
#include <string.h>
#include <errno.h>
#include <sys/ipc.h>
+#ifndef FIO_NO_HAVE_SHM_H
#include <sys/shm.h>
#include <sys/shm.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/stat.h>
@@
-254,7
+256,7
@@
static int setup_thread_area(void)
shm_id = shmget(0, size, IPC_CREAT | 0600);
if (shm_id != -1)
break;
shm_id = shmget(0, size, IPC_CREAT | 0600);
if (shm_id != -1)
break;
- if (errno != EINVAL && errno != ENOMEM) {
+ if (errno != EINVAL && errno != ENOMEM
&& errno != ENOSPC
) {
perror("shmget");
break;
}
perror("shmget");
break;
}
@@
-317,6
+319,10
@@
static struct thread_data *get_new_job(int global, struct thread_data *parent,
profile_add_hooks(td);
td->thread_number = thread_number;
profile_add_hooks(td);
td->thread_number = thread_number;
+
+ if (!parent || !parent->o.group_reporting)
+ stat_number++;
+
return td;
}
return td;
}
@@
-592,6
+598,13
@@
static int fixup_options(struct thread_data *td)
td->o.compress_percentage = 0;
}
td->o.compress_percentage = 0;
}
+ /*
+ * Using a non-uniform random distribution excludes usage of
+ * a random map
+ */
+ if (td->o.random_distribution != FIO_RAND_DIST_RANDOM)
+ td->o.norandommap = 1;
+
return ret;
}
return ret;
}
@@
-1198,7
+1211,7
@@
static int fill_def_thread(void)
fio_getaffinity(getpid(), &def_thread.o.cpumask);
def_thread.o.timeout = def_timeout;
fio_getaffinity(getpid(), &def_thread.o.cpumask);
def_thread.o.timeout = def_timeout;
-
+ def_thread.o.error_dump = 1;
/*
* fill default options
*/
/*
* fill default options
*/
@@
-1456,8
+1469,8
@@
int parse_cmd_line(int argc, char *argv[])
break;
case 'V':
terse_version = atoi(optarg);
break;
case 'V':
terse_version = atoi(optarg);
- if (!(terse_version == 2 || terse_version == 3
)
||
-
(
terse_version == 4)) {
+ if (!(terse_version == 2 || terse_version == 3 ||
+ terse_version == 4)) {
log_err("fio: bad terse version format\n");
exit_val = 1;
do_exit++;
log_err("fio: bad terse version format\n");
exit_val = 1;
do_exit++;