summaryrefslogtreecommitdiff
path: root/block/blk-iocost.c
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2026-01-29 16:27:15 +0900
committerJens Axboe <axboe@kernel.dk>2026-01-29 13:15:50 -0700
commit2719bd1ee1a1cd0535bc62e89b52822f2bbd14eb (patch)
tree090a7ffca6432cadfd6b430fcc279b43458da691 /block/blk-iocost.c
parent068f5b5ef5bf97e25568950f06ba32325bdc660b (diff)
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>
Diffstat (limited to 'block/blk-iocost.c')
-rw-r--r--block/blk-iocost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index a0416927d33d..ef543d163d46 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -812,7 +812,7 @@ static int ioc_autop_idx(struct ioc *ioc, struct gendisk *disk)
u64 now_ns;
/* rotational? */
- if (!blk_queue_nonrot(disk->queue))
+ if (blk_queue_rot(disk->queue))
return AUTOP_HDD;
/* handle SATA SSDs w/ broken NCQ */