projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fio: consolidate rand_seed to uint64_t
[fio.git]
/
iolog.c
diff --git
a/iolog.c
b/iolog.c
index 137c1e9889c8e025a59d8ab71df7378b767ef996..ec29971f6a51dfd2d67dc3e00f0c90a76264c7fc 100644
(file)
--- a/
iolog.c
+++ b/
iolog.c
@@
-188,6
+188,7
@@
void log_io_piece(struct thread_data *td, struct io_u *io_u)
ipo->file = io_u->file;
ipo->offset = io_u->offset;
ipo->len = io_u->buflen;
ipo->file = io_u->file;
ipo->offset = io_u->offset;
ipo->len = io_u->buflen;
+ ipo->numberio = io_u->numberio;
if (io_u_should_trim(td, io_u)) {
flist_add_tail(&ipo->trim_list, &td->trim_list);
if (io_u_should_trim(td, io_u)) {
flist_add_tail(&ipo->trim_list, &td->trim_list);
@@
-315,6
+316,7
@@
static int read_iolog2(struct thread_data *td, FILE *f)
act);
continue;
}
act);
continue;
}
+ fileno = get_fileno(td, fname);
} else if (r == 2) {
rw = DDIR_INVAL;
if (!strcmp(act, "add")) {
} else if (r == 2) {
rw = DDIR_INVAL;
if (!strcmp(act, "add")) {
@@
-479,17
+481,22
@@
int init_iolog(struct thread_data *td)
int ret = 0;
if (td->o.read_iolog_file) {
int ret = 0;
if (td->o.read_iolog_file) {
+ int need_swap;
+
/*
* Check if it's a blktrace file and load that if possible.
* Otherwise assume it's a normal log file and load that.
*/
/*
* Check if it's a blktrace file and load that if possible.
* Otherwise assume it's a normal log file and load that.
*/
- if (is_blktrace(td->o.read_iolog_file))
- ret = load_blktrace(td, td->o.read_iolog_file);
+ if (is_blktrace(td->o.read_iolog_file
, &need_swap
))
+ ret = load_blktrace(td, td->o.read_iolog_file
, need_swap
);
else
ret = init_iolog_read(td);
} else if (td->o.write_iolog_file)
ret = init_iolog_write(td);
else
ret = init_iolog_read(td);
} else if (td->o.write_iolog_file)
ret = init_iolog_write(td);
+ if (ret)
+ td_verror(td, EINVAL, "failed initializing iolog");
+
return ret;
}
return ret;
}
@@
-534,7
+541,7
@@
void finish_log_named(struct thread_data *td, struct io_log *log,
{
char file_name[256], *p;
{
char file_name[256], *p;
- snprintf(file_name,
200
, "%s_%s.log", prefix, postfix);
+ snprintf(file_name,
sizeof(file_name)
, "%s_%s.log", prefix, postfix);
p = basename(file_name);
if (td->client_type == FIO_CLIENT_TYPE_GUI) {
p = basename(file_name);
if (td->client_type == FIO_CLIENT_TYPE_GUI) {