zbd: Check for direct flag only if its block device
authorAnkit Kumar <ankit.kumar@samsung.com>
Tue, 31 May 2022 13:31:53 +0000 (19:01 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 2 Jun 2022 08:19:41 +0000 (02:19 -0600)
commit59c3200d579004d1d9c2dd3a36c162c780d520e4
treee4e038d1e7a8a35b7d1960578fd9533fa64c69ec
parent3716f9f1bf6db8d4f6500d756912d5ac8cf0a670
zbd: Check for direct flag only if its block device

nvme-ns generic character devices currently do not support O_DIRECT flag.
Check for fio option for direct flag only if filetype is a block device.

t/zbd skip test case #1 for character devices as they don't require
direct I/O.

Tested-by: Vincent Fu <vincent.fu@samsung.com>
Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Reviewed-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20220531133155.17493-8-ankit.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/zbd/test-zbd-support
zbd.c