io_u: Optimize set_rw_ddir()
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 8 May 2020 07:56:44 +0000 (16:56 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 May 2020 13:41:41 +0000 (07:41 -0600)
commit731461cc734b4f53947211b72f4af85b50b646ab
treeba628779fa27757093f2ef2f832b9e668166efec
parent3c1dc34cb10ccc6afbd7f8c3bcb0d32876f90dbd
io_u: Optimize set_rw_ddir()

There is no need to execute zbd_adjust_ddir() for a job that is not
using zonemode=zbd. So move the job mode test out of zbd_adjust_ddir()
and conditionally execute this function by first testing the job mode
in set_rw_ddir().

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c
zbd.c