X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=io_u.c;h=2f6aecf2bbf5c7710d99772934e32183a5c4fb89;hb=bedc9dc24223bb33be4120f4a57718bc54888ca5;hp=0b86d9f3c28158e6ef8da79587ce987b8b02e03a;hpb=26251d8d635bc9b9d31de2427095684b0c87b836;p=fio.git diff --git a/io_u.c b/io_u.c index 0b86d9f3..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);