Linux 7.0: blk_queue_nonrot() renamed to blk_queue_rot()

It does exactly the same thing, just inverts the return. Detect its
presence or absence and call the right one.

Sponsored-by: TrueNAS
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes #18216
This commit is contained in:
Rob Norris
2026-02-05 19:39:23 +11:00
committed by Brian Behlendorf
parent 7744f04962
commit 204de946eb
2 changed files with 30 additions and 0 deletions
+4
View File
@@ -445,7 +445,11 @@ vdev_disk_open(vdev_t *v, uint64_t *psize, uint64_t *max_psize,
v->vdev_has_securetrim = bdev_secure_discard_supported(bdev);
/* Inform the ZIO pipeline that we are non-rotational */
#ifdef HAVE_BLK_QUEUE_ROT
v->vdev_nonrot = !blk_queue_rot(bdev_get_queue(bdev));
#else
v->vdev_nonrot = blk_queue_nonrot(bdev_get_queue(bdev));
#endif
/* Is backed by a block device. */
v->vdev_is_blkdev = B_TRUE;