X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=8f515923bcf9b25c725c9d9a3e94ed2ecb1711a3;hp=6d8aa7a7087bdc67c8e72d0f5a8a4aa9fe22b8ef;hb=76867621c76ce561c315cd9c8d6b055eddd75d88;hpb=a596f047e2b3d447ccca76bd075f05473a1f8d1c diff --git a/filesetup.c b/filesetup.c index 6d8aa7a7..8f515923 100644 --- a/filesetup.c +++ b/filesetup.c @@ -280,7 +280,6 @@ static int bdev_size(struct thread_data *td, struct fio_file *f) r = blockdev_size(f, &bytes); if (r) { td_verror(td, r, "blockdev_size"); - printf("fd is %d\n", f->fd); goto err; } @@ -760,6 +759,9 @@ int setup_files(struct thread_data *td) } } + if (td->o.size_percent) + total_size = (total_size * td->o.size_percent) / 100; + if (!td->o.size || td->o.size > total_size) td->o.size = total_size;