From 58726a1006aa33303e41951faac1ceca2bf09ec5 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 2 Jun 2009 11:27:26 +0200 Subject: [PATCH 1/1] Fix problem with fadvise() and fill_device option Signed-off-by: Jens Axboe --- filesetup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/filesetup.c b/filesetup.c index 85a17476..1372177e 100644 --- a/filesetup.c +++ b/filesetup.c @@ -255,8 +255,11 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f, { int ret = 0; - if (len == -1ULL) + if (len == -1ULL) { len = f->io_size; + if (len == -1ULL && td->o.fill_device) + return 0; + } if (off == -1ULL) off = f->file_offset; -- 2.25.1