summaryrefslogtreecommitdiff
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-04-15 07:52:42 +0300
committerJens Axboe <axboe@kernel.dk>2022-04-18 04:49:59 +0300
commit10f0d2a517796b8f6dc04fb0cc3e49003ae6b0bc (patch)
tree294ac1a4503f37520ebbc866e4c7313818b27d77 /drivers/md/md.c
parent9964e674559b02619fee2012a56839624143d02e (diff)
downloadlinux-10f0d2a517796b8f6dc04fb0cc3e49003ae6b0bc.tar.xz
block: add a bdev_nonrot helper
Add a helper to check the nonrot flag based on the block_device instead of having to poke into the block layer internal request_queue. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: David Sterba <dsterba@suse.com> [btrfs] Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220415045258.199825-12-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 309b3af906ad..19636c2f2cda 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5991,8 +5991,7 @@ int md_run(struct mddev *mddev)
bool nonrot = true;
rdev_for_each(rdev, mddev) {
- if (rdev->raid_disk >= 0 &&
- !blk_queue_nonrot(bdev_get_queue(rdev->bdev))) {
+ if (rdev->raid_disk >= 0 && !bdev_nonrot(rdev->bdev)) {
nonrot = false;
break;
}