X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=eta.c;h=066a732f23a211cdc167e0f6419c75d751cc1390;hp=bcf0676a157d2094b2298bf69e8bffd96a322016;hb=836fcc0fceb233ebcc41ee63b4ea5cae20b678a4;hpb=7956f141c058cdd95f14491ee646b7f7951ab2ab diff --git a/eta.c b/eta.c index bcf0676a..066a732f 100644 --- a/eta.c +++ b/eta.c @@ -140,13 +140,19 @@ static int thread_eta(struct thread_data *td) } /* - * if writing, bytes_total will be twice the size. If mixing, - * assume a 50/50 split and thus bytes_total will be 50% larger. + * if writing and verifying afterwards, bytes_total will be twice the + * size. In a mixed workload, verify phase will be the size of the + * first stage writes. */ if (td->o.do_verify && td->o.verify && td_write(td)) { - if (td_rw(td)) - bytes_total = bytes_total * 3 / 2; - else + if (td_rw(td)) { + unsigned int perc = 50; + + if (td->o.rwmix[DDIR_WRITE]) + perc = td->o.rwmix[DDIR_WRITE]; + + bytes_total += (bytes_total * perc) / 100; + } else bytes_total <<= 1; }