Make check_mount_writes() test appropriate device types
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 13 Mar 2017 18:14:57 +0000 (20:14 +0200)
committerJens Axboe <axboe@fb.com>
Mon, 13 Mar 2017 18:27:31 +0000 (12:27 -0600)
commit5e81f9c1bf07623daec716dc0607c29e7e76bbab
treefc5c1bea011a8cadc1a3ec452f5fb81ec5b8bb51
parente8750877dcd5b748cc7100654f9d9dff770d0c83
Make check_mount_writes() test appropriate device types

There are platforms that use chrdev (instead of blkdev) for block
devices, thus check_mount_writes() needs to test an appropriate file
type(s) for potential mounted devices.

fio has had a macro FIO_HAVE_CHARDEV_SIZE basically for those using
chrdev for block devices, and this macro can be used here as well.

In FreeBSD and several others, blkdev is no longer used as a file type,
so it's safe to only test FIO_TYPE_CHAR if FIO_HAVE_CHARDEV_SIZE is
defined, but this commit leaves FIO_TYPE_BLOCK test since some
platforms may have/use both for block devices (not sure if exist).

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c