From: Jens Axboe Date: Tue, 2 Jun 2009 09:27:26 +0000 (+0200) Subject: Fix problem with fadvise() and fill_device option X-Git-Tag: fio-1.27~19 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=58726a1006aa33303e41951faac1ceca2bf09ec5 Fix problem with fadvise() and fill_device option Signed-off-by: Jens Axboe --- 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;