X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=backend.c;h=7cf9b382703ecac53d4998d56951b15b40c12ddf;hp=c14f37ca55e809f534652ae6e289a214486277d3;hb=07c4d94b85c121aeda013a005bd926195bfee356;hpb=fa07eaa6913d7171c4259b3b0cd76dae3e76ca00 diff --git a/backend.c b/backend.c index c14f37ca..7cf9b382 100644 --- a/backend.c +++ b/backend.c @@ -1203,9 +1203,9 @@ static int init_io_u(struct thread_data *td) data_xfer = 0; err = 0; - err += io_u_rinit(&td->io_u_requeues, td->o.iodepth); - err += io_u_qinit(&td->io_u_freelist, td->o.iodepth); - err += io_u_qinit(&td->io_u_all, td->o.iodepth); + err += !io_u_rinit(&td->io_u_requeues, td->o.iodepth); + err += !io_u_qinit(&td->io_u_freelist, td->o.iodepth); + err += !io_u_qinit(&td->io_u_all, td->o.iodepth); if (err) { log_err("fio: failed setting up IO queues\n"); @@ -1692,16 +1692,14 @@ static void *thread_main(void *data) if (td_io_init(td)) goto err; - if (init_random_map(td)) + if (!init_random_map(td)) goto err; if (o->exec_prerun && exec_string(o, o->exec_prerun, (const char *)"prerun")) goto err; - if (o->pre_read) { - if (pre_read_files(td) < 0) - goto err; - } + if (o->pre_read && !pre_read_files(td)) + goto err; fio_verify_init(td);