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 Tony Hutter
parent ca18f1ad5f
commit 786b7c2a90
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
/* Physical volume size in bytes for the partition */
*psize = bdev_capacity(bdev);