Avoid irrelevant "offset extend ends" error message for chrdev
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 7 Mar 2017 20:12:55 +0000 (22:12 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 10 Mar 2017 21:43:37 +0000 (14:43 -0700)
commit0f34169ac64f009b193bed1c8fb6692844bf99c2
tree1e93e276dc8b184a54fc6663264fc5ed0071ca14
parent05cef7a0ec07241010b331cec7868926ba77ea6d
Avoid irrelevant "offset extend ends" error message for chrdev

This commit expands 957c81b9 to chrdev as well when char_size()
is configured (i.e. FIO_HAVE_CHARDEV_SIZE disabled) to just return
0 with ->real_file_size set to -1.

Platforms without FIO_HAVE_CHARDEV_SIZE enabled basically means
block devices are blkdev as a file type, so having this change
or not most likely makes no difference. If an I/O engine needs
to use chrdev (e.g. sgio) it usually has its own .get_file_size.

Also add a dprint(FD_FILE) message since ->file_offset is normally
0 at this point regardless of offset option value, despite having
a conditional to check this against ->real_file_size.

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