aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2010-02-26 00:20:38 -0500
committerJens Axboe <jens.axboe@oracle.com>2010-02-26 07:58:08 -0500
commit086fa5ff0854c676ec333760f4c0154b3b242616 (patch)
treeee63fb3c7c7d964bd799355b7cde18ba95f91f07 /drivers/block
parenteb28d31bc97e6374d81f404da309401ffaed467b (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/block')
-rw-r--r--drivers/block/DAC960.c2
-rw-r--r--drivers/block/brd.c2
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/drbd/drbd_nl.c2
-rw-r--r--drivers/block/floppy.c2
-rw-r--r--drivers/block/hd.c2
-rw-r--r--drivers/block/mg_disk.c2
-rw-r--r--drivers/block/paride/pd.c2
-rw-r--r--drivers/block/pktcdvd.c4
-rw-r--r--drivers/block/ps3disk.c2
-rw-r--r--drivers/block/ps3vram.c2
-rw-r--r--drivers/block/sunvdc.c2
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/block/viodasd.c2
-rw-r--r--drivers/block/xd.c2
-rw-r--r--drivers/block/xen-blkfront.c2
16 files changed, 17 insertions, 17 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 7412b5d4f5f3..1c0cd35e1913 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -2535,7 +2535,7 @@ static bool DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
2535 RequestQueue->queuedata = Controller; 2535 RequestQueue->queuedata = Controller;
2536 blk_queue_max_hw_segments(RequestQueue, Controller->DriverScatterGatherLimit); 2536 blk_queue_max_hw_segments(RequestQueue, Controller->DriverScatterGatherLimit);
2537 blk_queue_max_phys_segments(RequestQueue, Controller->DriverScatterGatherLimit); 2537 blk_queue_max_phys_segments(RequestQueue, Controller->DriverScatterGatherLimit);
2538 blk_queue_max_sectors(RequestQueue, Controller->MaxBlocksPerCommand); 2538 blk_queue_max_hw_sectors(RequestQueue, Controller->MaxBlocksPerCommand);
2539 disk->queue = RequestQueue; 2539 disk->queue = RequestQueue;
2540 sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n); 2540 sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n);
2541 disk->major = MajorNumber; 2541 disk->major = MajorNumber;
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 4f688434daf1..c6ddeacb77fd 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -434,7 +434,7 @@ static struct brd_device *brd_alloc(int i)
434 goto out_free_dev; 434 goto out_free_dev;
435 blk_queue_make_request(brd->brd_queue, brd_make_request); 435 blk_queue_make_request(brd->brd_queue, brd_make_request);
436 blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG, NULL); 436 blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG, NULL);
437 blk_queue_max_sectors(brd->brd_queue, 1024); 437 blk_queue_max_hw_sectors(brd->brd_queue, 1024);
438 blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY); 438 blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY);
439 439
440 disk = brd->brd_disk = alloc_disk(1 << part_shift); 440 disk = brd->brd_disk = alloc_disk(1 << part_shift);
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 86acdca5d0ce..030e52d72254 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1802,7 +1802,7 @@ static int cciss_add_disk(ctlr_info_t *h, struct gendisk *disk,
1802 /* This is a limit in the driver and could be eliminated. */ 1802 /* This is a limit in the driver and could be eliminated. */
1803 blk_queue_max_phys_segments(disk->queue, h->maxsgentries); 1803 blk_queue_max_phys_segments(disk->queue, h->maxsgentries);
1804 1804
1805 blk_queue_max_sectors(disk->queue, h->cciss_max_sectors); 1805 blk_queue_max_hw_sectors(disk->queue, h->cciss_max_sectors);
1806 1806
1807 blk_queue_softirq_done(disk->queue, cciss_softirq_done); 1807 blk_queue_softirq_done(disk->queue, cciss_softirq_done);
1808 1808
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 1292e0620663..9b55e64196fc 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -709,7 +709,7 @@ void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int max_seg_s) __mu
709 709
710 max_seg_s = min(queue_max_sectors(b) * queue_logical_block_size(b), max_seg_s); 710 max_seg_s = min(queue_max_sectors(b) * queue_logical_block_size(b), max_seg_s);
711 711
712 blk_queue_max_sectors(q, max_seg_s >> 9); 712 blk_queue_max_hw_sectors(q, max_seg_s >> 9);
713 blk_queue_max_phys_segments(q, max_segments ? max_segments : MAX_PHYS_SEGMENTS); 713 blk_queue_max_phys_segments(q, max_segments ? max_segments : MAX_PHYS_SEGMENTS);
714 blk_queue_max_hw_segments(q, max_segments ? max_segments : MAX_HW_SEGMENTS); 714 blk_queue_max_hw_segments(q, max_segments ? max_segments : MAX_HW_SEGMENTS);
715 blk_queue_max_segment_size(q, max_seg_s); 715 blk_queue_max_segment_size(q, max_seg_s);
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 3266b4f65daa..b9b117059b62 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4234,7 +4234,7 @@ static int __init floppy_init(void)
4234 err = -ENOMEM; 4234 err = -ENOMEM;
4235 goto out_unreg_driver; 4235 goto out_unreg_driver;
4236 } 4236 }
4237 blk_queue_max_sectors(floppy_queue, 64); 4237 blk_queue_max_hw_sectors(floppy_queue, 64);
4238 4238
4239 blk_register_region(MKDEV(FLOPPY_MAJOR, 0), 256, THIS_MODULE, 4239 blk_register_region(MKDEV(FLOPPY_MAJOR, 0), 256, THIS_MODULE,
4240 floppy_find, NULL, NULL); 4240 floppy_find, NULL, NULL);
diff --git a/drivers/block/hd.c b/drivers/block/hd.c
index d5cdce08ffd2..5116c65c07cb 100644
--- a/drivers/block/hd.c
+++ b/drivers/block/hd.c
@@ -719,7 +719,7 @@ static int __init hd_init(void)
719 return -ENOMEM; 719 return -ENOMEM;
720 } 720 }
721 721
722 blk_queue_max_sectors(hd_queue, 255); 722 blk_queue_max_hw_sectors(hd_queue, 255);
723 init_timer(&device_timer); 723 init_timer(&device_timer);
724 device_timer.function = hd_times_out; 724 device_timer.function = hd_times_out;
725 blk_queue_logical_block_size(hd_queue, 512); 725 blk_queue_logical_block_size(hd_queue, 512);
diff --git a/drivers/block/mg_disk.c b/drivers/block/mg_disk.c
index 02b2583df7fc..5416c9a606e4 100644
--- a/drivers/block/mg_disk.c
+++ b/drivers/block/mg_disk.c
@@ -980,7 +980,7 @@ static int mg_probe(struct platform_device *plat_dev)
980 __func__, __LINE__); 980 __func__, __LINE__);
981 goto probe_err_6; 981 goto probe_err_6;
982 } 982 }
983 blk_queue_max_sectors(host->breq, MG_MAX_SECTS); 983 blk_queue_max_hw_sectors(host->breq, MG_MAX_SECTS);
984 blk_queue_logical_block_size(host->breq, MG_SECTOR_SIZE); 984 blk_queue_logical_block_size(host->breq, MG_SECTOR_SIZE);
985 985
986 init_timer(&host->timer); 986 init_timer(&host->timer);
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 569e39e8f114..e712cd51af15 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -906,7 +906,7 @@ static int __init pd_init(void)
906 if (!pd_queue) 906 if (!pd_queue)
907 goto out1; 907 goto out1;
908 908
909 blk_queue_max_sectors(pd_queue, cluster); 909 blk_queue_max_hw_sectors(pd_queue, cluster);
910 910
911 if (register_blkdev(major, name)) 911 if (register_blkdev(major, name))
912 goto out2; 912 goto out2;
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 7cd2973ebb7b..6e1daa24da2f 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2312,7 +2312,7 @@ static int pkt_open_dev(struct pktcdvd_device *pd, fmode_t write)
2312 * even if the size is a multiple of the packet size. 2312 * even if the size is a multiple of the packet size.
2313 */ 2313 */
2314 spin_lock_irq(q->queue_lock); 2314 spin_lock_irq(q->queue_lock);
2315 blk_queue_max_sectors(q, pd->settings.size); 2315 blk_queue_max_hw_sectors(q, pd->settings.size);
2316 spin_unlock_irq(q->queue_lock); 2316 spin_unlock_irq(q->queue_lock);
2317 set_bit(PACKET_WRITABLE, &pd->flags); 2317 set_bit(PACKET_WRITABLE, &pd->flags);
2318 } else { 2318 } else {
@@ -2613,7 +2613,7 @@ static void pkt_init_queue(struct pktcdvd_device *pd)
2613 2613
2614 blk_queue_make_request(q, pkt_make_request); 2614 blk_queue_make_request(q, pkt_make_request);
2615 blk_queue_logical_block_size(q, CD_FRAMESIZE); 2615 blk_queue_logical_block_size(q, CD_FRAMESIZE);
2616 blk_queue_max_sectors(q, PACKET_MAX_SECTORS); 2616 blk_queue_max_hw_sectors(q, PACKET_MAX_SECTORS);
2617 blk_queue_merge_bvec(q, pkt_merge_bvec); 2617 blk_queue_merge_bvec(q, pkt_merge_bvec);
2618 q->queuedata = pd; 2618 q->queuedata = pd;
2619} 2619}
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index 03a130dca8ab..9cd1a4a542b8 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -474,7 +474,7 @@ static int __devinit ps3disk_probe(struct ps3_system_bus_device *_dev)
474 474
475 blk_queue_bounce_limit(queue, BLK_BOUNCE_HIGH); 475 blk_queue_bounce_limit(queue, BLK_BOUNCE_HIGH);
476 476
477 blk_queue_max_sectors(queue, dev->bounce_size >> 9); 477 blk_queue_max_hw_sectors(queue, dev->bounce_size >> 9);
478 blk_queue_segment_boundary(queue, -1UL); 478 blk_queue_segment_boundary(queue, -1UL);
479 blk_queue_dma_alignment(queue, dev->blk_size-1); 479 blk_queue_dma_alignment(queue, dev->blk_size-1);
480 blk_queue_logical_block_size(queue, dev->blk_size); 480 blk_queue_logical_block_size(queue, dev->blk_size);
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index a7ecb43b16ab..6416b262934b 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -754,7 +754,7 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
754 blk_queue_max_phys_segments(queue, MAX_PHYS_SEGMENTS); 754 blk_queue_max_phys_segments(queue, MAX_PHYS_SEGMENTS);
755 blk_queue_max_hw_segments(queue, MAX_HW_SEGMENTS); 755 blk_queue_max_hw_segments(queue, MAX_HW_SEGMENTS);
756 blk_queue_max_segment_size(queue, BLK_MAX_SEGMENT_SIZE); 756 blk_queue_max_segment_size(queue, BLK_MAX_SEGMENT_SIZE);
757 blk_queue_max_sectors(queue, BLK_SAFE_MAX_SECTORS); 757 blk_queue_max_hw_sectors(queue, BLK_SAFE_MAX_SECTORS);
758 758
759 gendisk = alloc_disk(1); 759 gendisk = alloc_disk(1);
760 if (!gendisk) { 760 if (!gendisk) {
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 411f064760b4..dd30cddd0f7f 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -693,7 +693,7 @@ static int probe_disk(struct vdc_port *port)
693 693
694 blk_queue_max_hw_segments(q, port->ring_cookies); 694 blk_queue_max_hw_segments(q, port->ring_cookies);
695 blk_queue_max_phys_segments(q, port->ring_cookies); 695 blk_queue_max_phys_segments(q, port->ring_cookies);
696 blk_queue_max_sectors(q, port->max_xfer_size); 696 blk_queue_max_hw_sectors(q, port->max_xfer_size);
697 g->major = vdc_major; 697 g->major = vdc_major;
698 g->first_minor = port->vio.vdev->dev_no << PARTITION_SHIFT; 698 g->first_minor = port->vio.vdev->dev_no << PARTITION_SHIFT;
699 strcpy(g->disk_name, port->disk_name); 699 strcpy(g->disk_name, port->disk_name);
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index d86d1357ccef..352ea24d66e8 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -2323,7 +2323,7 @@ static int ub_probe_lun(struct ub_dev *sc, int lnum)
2323 blk_queue_max_hw_segments(q, UB_MAX_REQ_SG); 2323 blk_queue_max_hw_segments(q, UB_MAX_REQ_SG);
2324 blk_queue_max_phys_segments(q, UB_MAX_REQ_SG); 2324 blk_queue_max_phys_segments(q, UB_MAX_REQ_SG);
2325 blk_queue_segment_boundary(q, 0xffffffff); /* Dubious. */ 2325 blk_queue_segment_boundary(q, 0xffffffff); /* Dubious. */
2326 blk_queue_max_sectors(q, UB_MAX_SECTORS); 2326 blk_queue_max_hw_sectors(q, UB_MAX_SECTORS);
2327 blk_queue_logical_block_size(q, lun->capacity.bsize); 2327 blk_queue_logical_block_size(q, lun->capacity.bsize);
2328 2328
2329 lun->disk = disk; 2329 lun->disk = disk;
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index a8c8b56b275e..d44ece7d7b7c 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -473,7 +473,7 @@ retry:
473 d->disk = g; 473 d->disk = g;
474 blk_queue_max_hw_segments(q, VIOMAXBLOCKDMA); 474 blk_queue_max_hw_segments(q, VIOMAXBLOCKDMA);
475 blk_queue_max_phys_segments(q, VIOMAXBLOCKDMA); 475 blk_queue_max_phys_segments(q, VIOMAXBLOCKDMA);
476 blk_queue_max_sectors(q, VIODASD_MAXSECTORS); 476 blk_queue_max_hw_sectors(q, VIODASD_MAXSECTORS);
477 g->major = VIODASD_MAJOR; 477 g->major = VIODASD_MAJOR;
478 g->first_minor = dev_no << PARTITION_SHIFT; 478 g->first_minor = dev_no << PARTITION_SHIFT;
479 if (dev_no >= 26) 479 if (dev_no >= 26)
diff --git a/drivers/block/xd.c b/drivers/block/xd.c
index d1fd032e7514..1a325fb05c92 100644
--- a/drivers/block/xd.c
+++ b/drivers/block/xd.c
@@ -242,7 +242,7 @@ static int __init xd_init(void)
242 } 242 }
243 243
244 /* xd_maxsectors depends on controller - so set after detection */ 244 /* xd_maxsectors depends on controller - so set after detection */
245 blk_queue_max_sectors(xd_queue, xd_maxsectors); 245 blk_queue_max_hw_sectors(xd_queue, xd_maxsectors);
246 246
247 for (i = 0; i < xd_drives; i++) 247 for (i = 0; i < xd_drives; i++)
248 add_disk(xd_gendisk[i]); 248 add_disk(xd_gendisk[i]);
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index a84702d1a35e..f9861aaa1fef 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -346,7 +346,7 @@ static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size)
346 346
347 /* Hard sector size and max sectors impersonate the equiv. hardware. */ 347 /* Hard sector size and max sectors impersonate the equiv. hardware. */
348 blk_queue_logical_block_size(rq, sector_size); 348 blk_queue_logical_block_size(rq, sector_size);
349 blk_queue_max_sectors(rq, 512); 349 blk_queue_max_hw_sectors(rq, 512);
350 350
351 /* Each segment in a request is up to an aligned page in size. */ 351 /* Each segment in a request is up to an aligned page in size. */
352 blk_queue_segment_boundary(rq, PAGE_SIZE - 1); 352 blk_queue_segment_boundary(rq, PAGE_SIZE - 1);