X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=6fdd2116601191ff08297cd7759a809a86c03fb8;hp=a8acdc04b4e1be49fc080be3f0a9a17e09281cef;hb=df9c26b10275a631e83e7cc92d5f7384998b2c49;hpb=be4ecfdf6c8daa75c4df8ac875c9a87da80d81a0 diff --git a/init.c b/init.c index a8acdc04..6fdd2116 100644 --- a/init.c +++ b/init.c @@ -19,7 +19,7 @@ #include "smalloc.h" #include "filehash.h" -static char fio_version_string[] = "fio 1.23"; +static char fio_version_string[] = "fio 1.24"; #define FIO_RANDSEED (0xb1899bedUL) @@ -206,6 +206,13 @@ static int setup_rate(struct thread_data *td) 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. @@ -214,6 +221,15 @@ static int fixup_options(struct thread_data *td) { struct thread_options *o = &td->o; +#ifndef FIO_HAVE_PSHARED_MUTEX + if (!td->o.use_thread) { + log_info("fio: this platform does not support process shared" + " mutexes, forcing use of threads. Use the 'thread'" + " option to get rid of this warning.\n"); + td->o.use_thread = 1; + } +#endif + #ifndef FIO_HAVE_CPU_AFFINITY if (td->o.gtod_cpu) { log_err("fio: platform must support CPU affinity for" @@ -260,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->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)) @@ -567,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; + td_new->files_size = 0; td_new->files = NULL; } @@ -886,6 +905,7 @@ struct debug_level debug_levels[] = { { .name = "parse", .shift = FD_PARSE }, { .name = "diskutil", .shift = FD_DISKUTIL }, { .name = "job", .shift = FD_JOB }, + { .name = "mutex", .shift = FD_MUTEX }, { .name = NULL, }, };