X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=f61fee8cb32240d2d85929eb0d131b009ec0d47d;hp=5971d78b635e6d31c352f187042cc238c0fd7428;hb=f52c9691bc8c285f3445235c69acdfd6de7f9b82;hpb=9cc80b6d92a15c6b9cbdbc021436f1628054cfda diff --git a/io_u.c b/io_u.c index 5971d78b..f61fee8c 100644 --- a/io_u.c +++ b/io_u.c @@ -68,6 +68,9 @@ static uint64_t last_block(struct thread_data *td, struct fio_file *f, if (td->o.zone_range) max_size = td->o.zone_range; + if (td->o.min_bs[ddir] > td->o.ba[ddir]) + max_size -= td->o.min_bs[ddir] - td->o.ba[ddir]; + max_blocks = max_size / (uint64_t) td->o.ba[ddir]; if (!max_blocks) return 0; @@ -1866,7 +1869,7 @@ void fill_io_buffer(struct thread_data *td, void *buf, unsigned int min_write, { struct thread_options *o = &td->o; - if (o->compress_percentage) { + if (o->compress_percentage || o->dedupe_percentage) { unsigned int perc = td->o.compress_percentage; struct frand_state *rs; unsigned int left = max_bs;