X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=834e5d214d5da390365858f36d67ed3fd67127a6;hp=558b0b072cef200dd140020c47008d29a1a01fcc;hb=ee88470c001012d08ae37bfc31741a935be2e7a1;hpb=1e97cce9f5a87a67293a05ec4533ed6968698b2e diff --git a/io_u.c b/io_u.c index 558b0b07..834e5d21 100644 --- a/io_u.c +++ b/io_u.c @@ -63,7 +63,7 @@ static int get_next_free_block(struct thread_data *td, struct fio_file *f, *b = 0; i = 0; - while ((*b) * td->rw_min_bs < f->file_size) { + while ((*b) * td->rw_min_bs < f->real_file_size) { if (f->file_map[i] != -1UL) { *b += ffz(f->file_map[i]); return 0; @@ -108,7 +108,7 @@ static int get_next_offset(struct thread_data *td, struct fio_file *f, b = f->last_pos / td->min_bs[ddir]; *offset = (b * td->min_bs[ddir]) + f->file_offset; - if (*offset > f->file_size) + if (*offset > f->real_file_size) return 1; return 0; @@ -267,13 +267,13 @@ struct io_u *get_io_u(struct thread_data *td, struct fio_file *f) return NULL; } - if (io_u->buflen + io_u->offset > f->file_size) { + if (io_u->buflen + io_u->offset > f->real_file_size) { if (td->io_ops->flags & FIO_RAWIO) { put_io_u(td, io_u); return NULL; } - io_u->buflen = f->file_size - io_u->offset; + io_u->buflen = f->real_file_size - io_u->offset; } if (io_u->ddir != DDIR_SYNC) {