X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=42a9f4155fbf13a8a284c9070de8f110d80c6001;hp=a48faf588140ca79f7f00a8a95f63266a63f7a39;hb=a609f12a170143c799f4856747e28b41dbda8dc5;hpb=d5b78f5a8fd73d21c1b84d71993c5690dbe098b5 diff --git a/filesetup.c b/filesetup.c index a48faf58..42a9f415 100644 --- a/filesetup.c +++ b/filesetup.c @@ -58,8 +58,12 @@ static int extend_file(struct thread_data *td, struct fio_file *f) unlink_file = 1; if (unlink_file || new_layout) { + int ret; + dprint(FD_FILE, "layout unlink %s\n", f->file_name); - if ((td_io_unlink_file(td, f) < 0) && (errno != ENOENT)) { + + ret = td_io_unlink_file(td, f); + if (ret != 0 && ret != ENOENT) { td_verror(td, errno, "unlink"); return 1; } @@ -761,16 +765,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; } /*