projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smalloc: change to a bitmap allocator
[fio.git]
/
log.c
diff --git
a/log.c
b/log.c
index 63c0a332d6bb6680998cbfd81a186d0ff6f24a3e..8f92e93f065d7b57234bbdbccf8bab875f785fe9 100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-40,6
+40,13
@@
void log_file(struct thread_data *td, struct fio_file *f,
if (!td->o.write_iolog_file)
return;
if (!td->o.write_iolog_file)
return;
+
+ /*
+ * this happens on the pre-open/close done before the job starts
+ */
+ if (!td->iolog_f)
+ return;
+
fprintf(td->iolog_f, "%s %s\n", f->file_name, act[what]);
}
fprintf(td->iolog_f, "%s %s\n", f->file_name, act[what]);
}
@@
-334,15
+341,6
@@
static int read_iolog2(struct thread_data *td, FILE *f)
return 0;
}
return 0;
}
-/*
- * Read version 1 iolog data.
- */
-static int read_iolog(struct thread_data *td, FILE *f)
-{
- log_err("fio: iolog version 1 is no longer supported\n");
- return 1;
-}
-
/*
* open iolog, check version, and call appropriate parser
*/
/*
* open iolog, check version, and call appropriate parser
*/
@@
-372,16
+370,8
@@
static int init_iolog_read(struct thread_data *td)
if (!strncmp(iolog_ver2, buffer, strlen(iolog_ver2)))
ret = read_iolog2(td, f);
else {
if (!strncmp(iolog_ver2, buffer, strlen(iolog_ver2)))
ret = read_iolog2(td, f);
else {
- /*
- * seek back to the beginning
- */
- if (fseek(f, 0, SEEK_SET) < 0) {
- td_verror(td, errno, "iolog read");
- log_err("fio: unable to read iolog\n");
- return 1;
- }
-
- ret = read_iolog(td, f);
+ log_err("fio: iolog version 1 is no longer supported\n");
+ ret = 1;
}
fclose(f);
}
fclose(f);
@@
-482,8
+472,9
@@
void __finish_log(struct io_log *log, const char *name)
void finish_log(struct thread_data *td, struct io_log *log, const char *name)
{
void finish_log(struct thread_data *td, struct io_log *log, const char *name)
{
- char file_name[256];
+ char file_name[256]
, *p
;
- snprintf(file_name, 200, "client%d_%s.log", td->thread_number, name);
- __finish_log(log, file_name);
+ snprintf(file_name, 200, "%s_%s.log", td->o.name, name);
+ p = basename(file_name);
+ __finish_log(log, p);
}
}