]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
block: introduce blk_queue_rot()
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 29 Jan 2026 07:27:15 +0000 (16:27 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 29 Jan 2026 20:15:50 +0000 (13:15 -0700)
commit2719bd1ee1a1cd0535bc62e89b52822f2bbd14eb
tree090a7ffca6432cadfd6b430fcc279b43458da691
parent068f5b5ef5bf97e25568950f06ba32325bdc660b
block: introduce blk_queue_rot()

To check if a request queue is for a rotational device, a double
negation is needed with the pattern "!blk_queue_nonrot(q)". Simplify
this with the introduction of the helper blk_queue_rot() which tests
if a requests queue limit has the BLK_FEAT_ROTATIONAL feature set.
All call sites of blk_queue_nonrot() are modified to use blk_queue_rot()
and blk_queue_nonrot() definition removed.

No functional changes.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c
block/blk-iocost.c
block/blk-iolatency.c
block/blk-wbt.c
include/linux/blkdev.h