Skip to content
Commit 29ece8b4 authored by Yufen Yu's avatar Yufen Yu Committed by Jens Axboe
Browse files

block: add BLK_MQ_POLL_CLASSIC for hybrid poll and return EINVAL for unexpected value



For q->poll_nsec == -1, means doing classic poll, not hybrid poll.
We introduce a new flag BLK_MQ_POLL_CLASSIC to replace -1, which
may make code much easier to read.

Additionally, since val is an int obtained with kstrtoint(), val can be
a negative value other than -1, so return -EINVAL for that case.

Thanks to Damien Le Moal for some good suggestion.

Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarYufen Yu <yuyufen@huawei.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9496c015
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment