diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2010-02-26 00:20:38 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-26 07:58:08 -0500 |
commit | 086fa5ff0854c676ec333760f4c0154b3b242616 (patch) | |
tree | ee63fb3c7c7d964bd799355b7cde18ba95f91f07 /drivers/md | |
parent | eb28d31bc97e6374d81f404da309401ffaed467b (diff) |
block: Rename blk_queue_max_sectors to blk_queue_max_hw_sectors
The block layer calling convention is blk_queue_<limit name>.
blk_queue_max_sectors predates this practice, leading to some confusion.
Rename the function to appropriately reflect that its intended use is to
set max_hw_sectors.
Also introduce a temporary wrapper for backwards compability. This can
be removed after the merge window is closed.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/linear.c | 2 | ||||
-rw-r--r-- | drivers/md/multipath.c | 4 | ||||
-rw-r--r-- | drivers/md/raid0.c | 4 | ||||
-rw-r--r-- | drivers/md/raid1.c | 4 | ||||
-rw-r--r-- | drivers/md/raid10.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 00435bd20699..af2d39d603c7 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -177,7 +177,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks) | |||
177 | */ | 177 | */ |
178 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && | 178 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && |
179 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 179 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) |
180 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 180 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
181 | 181 | ||
182 | conf->array_sectors += rdev->sectors; | 182 | conf->array_sectors += rdev->sectors; |
183 | cnt++; | 183 | cnt++; |
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 32a662fc55c9..4b323f45ad74 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -308,7 +308,7 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
308 | */ | 308 | */ |
309 | if (q->merge_bvec_fn && | 309 | if (q->merge_bvec_fn && |
310 | queue_max_sectors(q) > (PAGE_SIZE>>9)) | 310 | queue_max_sectors(q) > (PAGE_SIZE>>9)) |
311 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 311 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
312 | 312 | ||
313 | conf->working_disks++; | 313 | conf->working_disks++; |
314 | mddev->degraded--; | 314 | mddev->degraded--; |
@@ -478,7 +478,7 @@ static int multipath_run (mddev_t *mddev) | |||
478 | * a merge_bvec_fn to be involved in multipath */ | 478 | * a merge_bvec_fn to be involved in multipath */ |
479 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && | 479 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && |
480 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 480 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) |
481 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 481 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
482 | 482 | ||
483 | if (!test_bit(Faulty, &rdev->flags)) | 483 | if (!test_bit(Faulty, &rdev->flags)) |
484 | conf->working_disks++; | 484 | conf->working_disks++; |
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 77605cdceaf1..a1f7147b757f 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -182,7 +182,7 @@ static int create_strip_zones(mddev_t *mddev) | |||
182 | 182 | ||
183 | if (rdev1->bdev->bd_disk->queue->merge_bvec_fn && | 183 | if (rdev1->bdev->bd_disk->queue->merge_bvec_fn && |
184 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 184 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) |
185 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 185 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
186 | 186 | ||
187 | if (!smallest || (rdev1->sectors < smallest->sectors)) | 187 | if (!smallest || (rdev1->sectors < smallest->sectors)) |
188 | smallest = rdev1; | 188 | smallest = rdev1; |
@@ -325,7 +325,7 @@ static int raid0_run(mddev_t *mddev) | |||
325 | } | 325 | } |
326 | if (md_check_no_bitmap(mddev)) | 326 | if (md_check_no_bitmap(mddev)) |
327 | return -EINVAL; | 327 | return -EINVAL; |
328 | blk_queue_max_sectors(mddev->queue, mddev->chunk_sectors); | 328 | blk_queue_max_hw_sectors(mddev->queue, mddev->chunk_sectors); |
329 | mddev->queue->queue_lock = &mddev->queue->__queue_lock; | 329 | mddev->queue->queue_lock = &mddev->queue->__queue_lock; |
330 | 330 | ||
331 | ret = create_strip_zones(mddev); | 331 | ret = create_strip_zones(mddev); |
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 859bd3ffe435..5a06122abd3b 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -1158,7 +1158,7 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1158 | */ | 1158 | */ |
1159 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && | 1159 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && |
1160 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 1160 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) |
1161 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 1161 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
1162 | 1162 | ||
1163 | p->head_position = 0; | 1163 | p->head_position = 0; |
1164 | rdev->raid_disk = mirror; | 1164 | rdev->raid_disk = mirror; |
@@ -2103,7 +2103,7 @@ static int run(mddev_t *mddev) | |||
2103 | */ | 2103 | */ |
2104 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && | 2104 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && |
2105 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 2105 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) |
2106 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 2106 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
2107 | } | 2107 | } |
2108 | 2108 | ||
2109 | mddev->degraded = 0; | 2109 | mddev->degraded = 0; |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index d119b7b75e71..7584f9ab9bcf 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -1161,7 +1161,7 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1161 | */ | 1161 | */ |
1162 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && | 1162 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && |
1163 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 1163 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) |
1164 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 1164 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
1165 | 1165 | ||
1166 | p->head_position = 0; | 1166 | p->head_position = 0; |
1167 | rdev->raid_disk = mirror; | 1167 | rdev->raid_disk = mirror; |
@@ -2260,7 +2260,7 @@ static int run(mddev_t *mddev) | |||
2260 | */ | 2260 | */ |
2261 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && | 2261 | if (rdev->bdev->bd_disk->queue->merge_bvec_fn && |
2262 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) | 2262 | queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) |
2263 | blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); | 2263 | blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); |
2264 | 2264 | ||
2265 | disk->head_position = 0; | 2265 | disk->head_position = 0; |
2266 | } | 2266 | } |