drop logging when blkdev invalidation failed on unsupported platforms
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 25 Jul 2017 19:05:44 +0000 (22:05 +0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 25 Jul 2017 19:56:21 +0000 (13:56 -0600)
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 <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup.c

index 38ad9ed..3b2ebd9 100644 (file)
@@ -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);