X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=1dec2bbd324209acf04b72e1430c4d1d5d9db2cb;hp=f4125b13c5f05c1064d07d5e12bf72d5295a034e;hb=2f073b09812255edca0f5854d36720418db88912;hpb=a4f4fdd7c9e46a50bc33ecef44d9f06036580ad4 diff --git a/init.c b/init.c index f4125b13..1dec2bbd 100644 --- a/init.c +++ b/init.c @@ -639,7 +639,7 @@ static void fixup_options(struct thread_data *td) static char *to_kmg(unsigned int val) { char *buf = malloc(32); - char post[] = { 0, 'K', 'M', 'G', 'P', 0 }; + char post[] = { 0, 'K', 'M', 'G', 'P', 'E', 0 }; char *p = post; do { @@ -679,7 +679,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num) td->io_ops->flags |= FIO_RAWIO; td->filetype = FIO_TYPE_FILE; - if (!stat(jobname, &sb)) { + if (td->filename && !lstat(td->filename, &sb)) { if (S_ISBLK(sb.st_mode)) td->filetype = FIO_TYPE_BD; else if (S_ISCHR(sb.st_mode)) @@ -845,7 +845,7 @@ int init_random_state(struct thread_data *td) return 0; if (td->rand_repeatable) - seeds[3] = FIO_RANDSEED; + seeds[3] = FIO_RANDSEED * td->thread_number; if (!td->norandommap) { for_each_file(td, f, i) {