From: Jens Axboe Date: Tue, 2 Aug 2016 15:07:07 +0000 (-0600) Subject: Revert "filesetup: ensure that we align file starting offset" X-Git-Tag: fio-2.14~67 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=9bbefaa2056e8551805bbf8915adbc81cedd68e8 Revert "filesetup: ensure that we align file starting offset" There are valid reasons to use an offset that isn't a multiple of the block size. We previously made this change to fix an issue with a job file, but that job file had an offset that wasn't a multiple of the hardware block size. As long as the offset is a multiple of the hardware block size for unbuffered IO, then it should be fine. This reverts commit c465cd14ca958dfdb87bb1998add722d62ae3691. --- diff --git a/filesetup.c b/filesetup.c index a48faf58..1ecdda61 100644 --- a/filesetup.c +++ b/filesetup.c @@ -761,16 +761,12 @@ static unsigned long long get_fs_free_counts(struct thread_data *td) uint64_t get_start_offset(struct thread_data *td, struct fio_file *f) { struct thread_options *o = &td->o; - uint64_t offset; if (o->file_append && f->filetype == FIO_TYPE_FILE) return f->real_file_size; - offset = td->o.start_offset + td->subjob_number * td->o.offset_increment; - if (offset % td_max_bs(td)) - offset -= (offset % td_max_bs(td)); - - return offset; + return td->o.start_offset + + td->subjob_number * td->o.offset_increment; } /*