X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=filesetup.c;h=b8d1d83899cea588a40af2ed126adf150f26fa4c;hb=refs%2Fheads%2Fmaster;hp=14c7610849218194c475366d8fe2f641084fa6ba;hpb=223decddb199e9af0c5cd357d28c43e48dbcea7a;p=fio.git diff --git a/filesetup.c b/filesetup.c index 14c76108..cb42a852 100644 --- a/filesetup.c +++ b/filesetup.c @@ -749,6 +749,11 @@ open_again: if (!read_only) flags |= O_RDWR; + if (td->o.verify_only) { + flags &= ~O_RDWR; + flags |= O_RDONLY; + } + if (f->filetype == FIO_TYPE_FILE && td->o.allow_create) flags |= O_CREAT; @@ -1406,8 +1411,8 @@ done: td_restore_runstate(td, old_state); - if (td->o.fdp) { - err = fdp_init(td); + if (td->o.dp_type != FIO_DP_NONE) { + err = dp_init(td); if (err) goto err_out; } @@ -1447,9 +1452,8 @@ static void __init_rand_distribution(struct thread_data *td, struct fio_file *f) nranges = (fsize + range_size - 1ULL) / range_size; - seed = jhash(f->file_name, strlen(f->file_name), 0) * td->thread_number; - if (!td->o.rand_repeatable) - seed = td->rand_seeds[FIO_RAND_BLOCK_OFF]; + seed = jhash(f->file_name, strlen(f->file_name), 0) * td->thread_number * + td->rand_seeds[FIO_RAND_BLOCK_OFF]; if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) zipf_init(&f->zipf, nranges, td->o.zipf_theta.u.f, td->o.random_center.u.f, seed);