filesetup: don't round/adjust size for size_percent == 100
authorJens Axboe <axboe@kernel.dk>
Fri, 9 Mar 2018 19:55:21 +0000 (12:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 9 Mar 2018 19:55:21 +0000 (12:55 -0700)
For the full device, don't apply any rounding or bs based
adjustment. Just treat it like size_percent wasn't even set.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup.c

index cced5561b74ed84016b59606627ad9deb828720b..dd8f6eb2b0f67660d56582142f81ba64a98a825d 100644 (file)
@@ -1036,7 +1036,7 @@ int setup_files(struct thread_data *td)
                if (f->io_size == -1ULL)
                        total_size = -1ULL;
                else {
                if (f->io_size == -1ULL)
                        total_size = -1ULL;
                else {
-                        if (o->size_percent) {
+                        if (o->size_percent && o->size_percent != 100) {
                                uint64_t file_size;
 
                                file_size = f->io_size + f->file_offset;
                                uint64_t file_size;
 
                                file_size = f->io_size + f->file_offset;