projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use strict matching for --section command line option
[fio.git]
/
init.c
diff --git
a/init.c
b/init.c
index 1adc004b05b754b8e48575634452f5371eff046a..4ae3baf0af67b85d88eeaa476f3135011649755c 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-19,7
+19,7
@@
#include "smalloc.h"
#include "filehash.h"
#include "smalloc.h"
#include "filehash.h"
-static char fio_version_string[] = "fio 1.2
3
";
+static char fio_version_string[] = "fio 1.2
4
";
#define FIO_RANDSEED (0xb1899bedUL)
#define FIO_RANDSEED (0xb1899bedUL)
@@
-206,6
+206,13
@@
static int setup_rate(struct thread_data *td)
return 0;
}
return 0;
}
+static int fixed_block_size(struct thread_options *o)
+{
+ return o->min_bs[DDIR_READ] == o->max_bs[DDIR_READ] &&
+ o->min_bs[DDIR_WRITE] == o->max_bs[DDIR_WRITE] &&
+ o->min_bs[DDIR_READ] == o->min_bs[DDIR_WRITE];
+}
+
/*
* Lazy way of fixing up options that depend on each other. We could also
* define option callback handlers, but this is easier.
/*
* Lazy way of fixing up options that depend on each other. We could also
* define option callback handlers, but this is easier.
@@
-269,8
+276,10
@@
static int fixup_options(struct thread_data *td)
if (!o->file_size_high)
o->file_size_high = o->file_size_low;
if (!o->file_size_high)
o->file_size_high = o->file_size_low;
- if (o->norandommap && o->verify != VERIFY_NONE) {
- log_err("fio: norandommap given, verify disabled\n");
+ if (o->norandommap && o->verify != VERIFY_NONE
+ && !fixed_block_size(o)) {
+ log_err("fio: norandommap given for variable block sizes, "
+ "verify disabled\n");
o->verify = VERIFY_NONE;
}
if (o->bs_unaligned && (o->odirect || td->io_ops->flags & FIO_RAWIO))
o->verify = VERIFY_NONE;
}
if (o->bs_unaligned && (o->odirect || td->io_ops->flags & FIO_RAWIO))
@@
-576,6
+585,7
@@
static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
if (file_alloced) {
td_new->o.filename = NULL;
td_new->files_index = 0;
if (file_alloced) {
td_new->o.filename = NULL;
td_new->files_index = 0;
+ td_new->files_size = 0;
td_new->files = NULL;
}
td_new->files = NULL;
}
@@
-598,7
+608,7
@@
static int skip_this_section(const char *name)
if (!strncmp(name, "global", 6))
return 0;
if (!strncmp(name, "global", 6))
return 0;
- return str
ncmp(job_section, name, strlen(job_section)
);
+ return str
cmp(job_section, name
);
}
static int is_empty_or_comment(char *line)
}
static int is_empty_or_comment(char *line)