Test fsync/fdatasync/sync_file_range for the next i/o only if should_fsync(td)
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 20 Mar 2017 21:28:47 +0000 (23:28 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 21 Mar 2017 13:16:11 +0000 (07:16 -0600)
Checking an inline function should_fsync() first is better since
should_fsync() itself contains td_write() as a condition to return true,
and there's no need for non-write td to go through the rest of checks
when they result in false due to td->io_issues[DDIR_WRITE] being 0.

(This commit directly goes on top of the previous one)

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

No differences found