From 825b0a75ded0b3bec4d70ea8ea50af3cad7abab5 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 6 Mar 2018 12:42:57 -0700 Subject: [PATCH] Don't make fadvise failure fatal It's just an advisory hint. Warn once that it failed, then march on. Fixes: https://github.com/axboe/fio/issues/554 Signed-off-by: Jens Axboe --- debug.h | 1 + ioengines.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debug.h b/debug.h index ba622146..ac5f2ccd 100644 --- a/debug.h +++ b/debug.h @@ -43,6 +43,7 @@ enum { FIO_WARN_VERIFY_BUF = 2, FIO_WARN_ZONED_BUG = 4, FIO_WARN_IOLOG_DROP = 8, + FIO_WARN_FADVISE = 16, }; #ifdef FIO_INC_DEBUG diff --git a/ioengines.c b/ioengines.c index 5dd2311a..965581aa 100644 --- a/ioengines.c +++ b/ioengines.c @@ -498,8 +498,8 @@ int td_io_open_file(struct thread_data *td, struct fio_file *f) } if (posix_fadvise(f->fd, f->file_offset, f->io_size, flags) < 0) { - td_verror(td, errno, "fadvise"); - goto err; + if (!fio_did_warn(FIO_WARN_FADVISE)) + log_err("fio: fadvise hint failed\n"); } } #ifdef FIO_HAVE_WRITE_HINT -- 2.25.1