projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allocate file structure from shared process pool
[fio.git]
/
log.c
diff --git
a/log.c
b/log.c
index 039e74b25e77c5098631b83d1e0fbf16b26b0e27..f6fbaeb26c7e1c023055ada3252bf59201cc32c1 100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-65,7
+65,7
@@
int read_iolog_get(struct thread_data *td, struct io_u *io_u)
* invalid ddir, this is a file action
*/
if (ipo->ddir == DDIR_INVAL) {
* invalid ddir, this is a file action
*/
if (ipo->ddir == DDIR_INVAL) {
- struct fio_file *f =
&
td->files[ipo->fileno];
+ struct fio_file *f = td->files[ipo->fileno];
if (ipo->file_action == FIO_LOG_OPEN_FILE) {
assert(!td_io_open_file(td, f));
if (ipo->file_action == FIO_LOG_OPEN_FILE) {
assert(!td_io_open_file(td, f));
@@
-81,9
+81,12
@@
int read_iolog_get(struct thread_data *td, struct io_u *io_u)
io_u->offset = ipo->offset;
io_u->buflen = ipo->len;
io_u->ddir = ipo->ddir;
io_u->offset = ipo->offset;
io_u->buflen = ipo->len;
io_u->ddir = ipo->ddir;
- io_u->file =
&
td->files[ipo->fileno];
+ io_u->file = td->files[ipo->fileno];
get_file(io_u->file);
get_file(io_u->file);
+ dprint(FD_IO, "iolog: get %llu/%lu/%s\n", io_u->offset,
+ io_u->buflen, io_u->file->file_name);
+
if (ipo->delay)
iolog_delay(td, ipo->delay);
if (ipo->delay)
iolog_delay(td, ipo->delay);
@@
-105,6
+108,12
@@
void prune_io_piece_log(struct thread_data *td)
rb_erase(n, &td->io_hist_tree);
free(ipo);
}
rb_erase(n, &td->io_hist_tree);
free(ipo);
}
+
+ while (!list_empty(&td->io_hist_list)) {
+ ipo = list_entry(td->io_hist_list.next, struct io_piece, list);
+ list_del(&ipo->list);
+ free(ipo);
+ }
}
/*
}
/*
@@
-129,8
+138,7
@@
void log_io_piece(struct thread_data *td, struct io_u *io_u)
* For both these cases, just reading back data in the order we
* wrote it out is the fastest.
*/
* For both these cases, just reading back data in the order we
* wrote it out is the fastest.
*/
- if (!td_random(td) || !td->o.overwrite ||
- (io_u->file->flags & FIO_FILE_NOSORT)) {
+ if (!td_random(td) || !td->o.overwrite) {
INIT_LIST_HEAD(&ipo->list);
list_add_tail(&ipo->list, &td->io_hist_list);
return;
INIT_LIST_HEAD(&ipo->list);
list_add_tail(&ipo->list, &td->io_hist_list);
return;