X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=2f6aecf2bbf5c7710d99772934e32183a5c4fb89;hp=8e27708731c7290abc4e468000ec045d856e1241;hb=7b5cb700485518c2e7f2f49548319c89ba907195;hpb=a2879fea33ee8c701da766e2def867f7fb2d052e diff --git a/io_u.c b/io_u.c index 8e277087..2f6aecf2 100644 --- a/io_u.c +++ b/io_u.c @@ -273,7 +273,7 @@ static int get_next_seq_offset(struct thread_data *td, struct fio_file *f, { assert(ddir_rw(ddir)); - if (f->last_pos >= f->io_size + get_start_offset(td) && td->o.time_based) + if (f->last_pos >= f->io_size + get_start_offset(td, f) && td->o.time_based) f->last_pos = f->last_pos - f->io_size; if (f->last_pos < f->real_file_size) { @@ -415,7 +415,7 @@ static inline int io_u_fits(struct thread_data *td, struct io_u *io_u, { struct fio_file *f = io_u->file; - return io_u->offset + buflen <= f->io_size + get_start_offset(td); + return io_u->offset + buflen <= f->io_size + get_start_offset(td, f); } static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u, @@ -1490,7 +1490,8 @@ struct io_u *get_io_u(struct thread_data *td) if (td->flags & TD_F_REFILL_BUFFERS) { io_u_fill_buffer(td, io_u, io_u->xfer_buflen, io_u->xfer_buflen); - } else if (td->flags & TD_F_SCRAMBLE_BUFFERS) + } else if ((td->flags & TD_F_SCRAMBLE_BUFFERS) && + !(td->flags & TD_F_COMPRESS)) do_scramble = 1; if (td->flags & TD_F_VER_NONE) { populate_verify_io_u(td, io_u); @@ -1595,9 +1596,6 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, if (!gtod_reduce(td)) add_iops_sample(td, idx, bytes, &icd->time); - - if (td->o.number_ios && !--td->o.number_ios) - td->done = 1; } static long long usec_for_io(struct thread_data *td, enum fio_ddir ddir)