X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=6a53bdaab074fcf9660c6e25e08c19408bd0dca2;hp=51da223d3e02ab194c45a77e6249870d9d0a62d4;hb=059b080217b86dbf9f3574c4661a1b2300522c79;hpb=799441286648bdced4f42d3040f37fd2e35eaf1d diff --git a/io_u.c b/io_u.c index 51da223d..6a53bdaa 100644 --- a/io_u.c +++ b/io_u.c @@ -249,7 +249,12 @@ static int get_next_seq_block(struct thread_data *td, struct fio_file *f, assert(ddir_rw(ddir)); if (f->last_pos < f->real_file_size) { - *b = (f->last_pos - f->file_offset) / td->o.min_bs[ddir]; + unsigned long long pos = f->last_pos - f->file_offset; + + if (pos) + pos += td->o.ddir_seq_add; + + *b = pos / td->o.min_bs[ddir]; return 0; }