projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29c8e86
)
Fix fill_device with read/randread
author
Jens Axboe
<jens.axboe@oracle.com>
Fri, 5 Jun 2009 20:11:52 +0000
(22:11 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Fri, 5 Jun 2009 20:11:52 +0000
(22:11 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index c902bdf7237f9896cd0577605a1211469225d99a..57928133369cdd520a1b89052cbc9362b773ca78 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-132,7
+132,7
@@
static int extend_file(struct thread_data *td, struct fio_file *f)
goto err;
}
}
- if (td->o.fill_device) {
+ if (td->o.fill_device
&& !td_write(td)
) {
fio_file_clear_size_known(f);
if (td_io_get_file_size(td, f))
goto err;
@@
-290,6
+290,9
@@
static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f,
if (off == -1ULL)
off = f->file_offset;
+ if (len == -1ULL || off == -1ULL)
+ return 0;
+
dprint(FD_IO, "invalidate cache %s: %llu/%llu\n", f->file_name, off,
len);