From: Tomohiro Kusumi Date: Tue, 25 Jul 2017 19:05:44 +0000 (+0300) Subject: drop logging when blkdev invalidation failed on unsupported platforms X-Git-Tag: fio-3.0~28 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=e1933299ed9f1525e010e0489f0185c063d6d129;hp=e9184ec1bc294d889685dae98cd13122b21f6ae8 drop logging when blkdev invalidation failed on unsupported platforms 22de5d77('Use ENOTSUP if OS doesn't support blkdev page cache invalidation') changed errno values being used on supported platforms to ENOTSUP, and also log_info'd it via strerror(), but strerror() isn't working on some platform and instead prints irrelevant string. Re: fio Windows Invalidate http://www.spinics.net/lists/fio/msg06084.html The logging of ENOTSUP could just be dropped since this isn't a real failure, as many platforms either don't have the idea of invalidating blkdev's page cache mapping, or use chrdev for block devices. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index 38ad9edc..3b2ebd9c 100644 --- a/filesetup.c +++ b/filesetup.c @@ -528,8 +528,6 @@ static int __file_invalidate_cache(struct thread_data *td, struct fio_file *f, } if (ret < 0) errval = errno; - else if (ret) /* probably not supported */ - errval = ret; } else if (f->filetype == FIO_TYPE_CHAR || f->filetype == FIO_TYPE_PIPE) { dprint(FD_IO, "invalidate not supported %s\n", f->file_name);