projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ensure we inherit global latency/bw log settings
[fio.git]
/
blktrace.c
diff --git
a/blktrace.c
b/blktrace.c
index 9e4e5998a73246cfa9a1df5e2adb2926777c056b..4b5567effe6ab2624079df36284df4ad524d0f19 100644
(file)
--- a/
blktrace.c
+++ b/
blktrace.c
@@
-217,6
+217,8
@@
static int trace_add_file(struct thread_data *td, __u32 device)
dprint(FD_BLKTRACE, "add devices %s\n", dev);
fileno = add_file_exclusive(td, dev);
dprint(FD_BLKTRACE, "add devices %s\n", dev);
fileno = add_file_exclusive(td, dev);
+ td->files[fileno]->major = maj;
+ td->files[fileno]->minor = min;
trace_add_open_close_event(td, fileno, FIO_LOG_OPEN_FILE);
last_fileno = fileno;
}
trace_add_open_close_event(td, fileno, FIO_LOG_OPEN_FILE);
last_fileno = fileno;
}
@@
-369,7
+371,7
@@
int load_blktrace(struct thread_data *td, const char *filename, int need_swap)
unsigned int cpu;
unsigned int rw_bs[2];
struct fifo *fifo;
unsigned int cpu;
unsigned int rw_bs[2];
struct fifo *fifo;
- int fd, i;
+ int fd, i
, old_state
;
struct fio_file *f;
fd = open(filename, O_RDONLY);
struct fio_file *f;
fd = open(filename, O_RDONLY);
@@
-380,6
+382,8
@@
int load_blktrace(struct thread_data *td, const char *filename, int need_swap)
fifo = fifo_alloc(TRACE_FIFO_SIZE);
fifo = fifo_alloc(TRACE_FIFO_SIZE);
+ old_state = td_bump_runstate(td, TD_SETTING_UP);
+
td->o.size = 0;
cpu = 0;
td->o.size = 0;
cpu = 0;
@@
-458,6
+462,8
@@
int load_blktrace(struct thread_data *td, const char *filename, int need_swap)
fifo_free(fifo);
close(fd);
fifo_free(fifo);
close(fd);
+ td_restore_runstate(td, old_state);
+
if (!td->files_index) {
log_err("fio: did not find replay device(s)\n");
return 1;
if (!td->files_index) {
log_err("fio: did not find replay device(s)\n");
return 1;