Drop redundant td_rw(td) tests
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 7 Mar 2017 20:12:59 +0000 (22:12 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 10 Mar 2017 21:43:37 +0000 (14:43 -0700)
commitdcf9844e850e01d7c4db59960bbc4450a8cbf7ef
treef7b0025180e7ddf3d026947f944f74f7be892d4d
parent49cff020b15ad63a64188618e8b17d9f9463649d
Drop redundant td_rw(td) tests

Since TD_DDIR_READ is 1, TD_DDIR_WRITE is 1<<1, and td_rw() requires
both TD_DDIR_READ/WRITE bits set, testing (td_read(td) || td_rw(td))
turns out to be

if td_read(td) is false, td_rw(td) is always false,
if td_read(td) is true, td_rw(td) won't be tested,
thus the result equals that of td_read(td).

It's the same for td_write(td) as well.

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