summaryrefslogtreecommitdiff
path: root/blktrace.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2010-08-24 15:01:37 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-08-24 15:01:37 +0200
commit49ffb4a2e1ac3026d77d9e1c03edc2753fcec41b (patch)
tree89718dae11c2490f95c72b6b2b91b4a3c659a728 /blktrace.c
parentc2509cd7fa44c043099ad58bcb3b3f789a5a014b (diff)
downloadfio-49ffb4a2e1ac3026d77d9e1c03edc2753fcec41b.tar.gz
Fix blktrace replay
We would add duplicate files, if the open event comes before the add file event. Make sure we return the current index file instead of adding a duplicate, this causes bad file lookups. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'blktrace.c')
-rw-r--r--blktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blktrace.c b/blktrace.c
index ef3e18fd..68ba964a 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -187,7 +187,7 @@ static void trace_add_file(struct thread_data *td, __u32 device)
int fileno;
dprint(FD_BLKTRACE, "add devices %s\n", dev);
- fileno = add_file(td, dev);
+ fileno = add_file_exclusive(td, dev);
trace_add_open_event(td, fileno);
}
}