projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
options: remove dependency of 'o' being first in 'td'
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index a48faf588140ca79f7f00a8a95f63266a63f7a39..42a9f4155fbf13a8a284c9070de8f110d80c6001 100644
(file)
--- 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) {
unlink_file = 1;
if (unlink_file || new_layout) {
+ int ret;
+
dprint(FD_FILE, "layout unlink %s\n", f->file_name);
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;
}
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 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;
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;
}
/*
}
/*