aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2010-02-26 00:20:37 -0500
committerJens Axboe <jens.axboe@oracle.com>2010-02-26 07:58:08 -0500
commiteb28d31bc97e6374d81f404da309401ffaed467b (patch)
tree580d750832dd1da39a5c93b91b8e069db3395b1c
parente751e76a5f7adeee7438e68b0965559ad2864d0d (diff)
block: Add BLK_ prefix to definitions
Add a BLK_ prefix to block layer constants. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--block/blk-settings.c4
-rw-r--r--drivers/block/ps3vram.c4
-rw-r--r--include/linux/blkdev.h10
3 files changed, 11 insertions, 7 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 4db46f2fcbe5..3c53b0beb8dd 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -94,7 +94,7 @@ void blk_set_default_limits(struct queue_limits *lim)
94 lim->max_phys_segments = MAX_PHYS_SEGMENTS; 94 lim->max_phys_segments = MAX_PHYS_SEGMENTS;
95 lim->max_hw_segments = MAX_HW_SEGMENTS; 95 lim->max_hw_segments = MAX_HW_SEGMENTS;
96 lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK; 96 lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
97 lim->max_segment_size = MAX_SEGMENT_SIZE; 97 lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
98 lim->max_sectors = BLK_DEF_MAX_SECTORS; 98 lim->max_sectors = BLK_DEF_MAX_SECTORS;
99 lim->max_hw_sectors = INT_MAX; 99 lim->max_hw_sectors = INT_MAX;
100 lim->max_discard_sectors = 0; 100 lim->max_discard_sectors = 0;
@@ -154,7 +154,7 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
154 q->unplug_timer.data = (unsigned long)q; 154 q->unplug_timer.data = (unsigned long)q;
155 155
156 blk_set_default_limits(&q->limits); 156 blk_set_default_limits(&q->limits);
157 blk_queue_max_sectors(q, SAFE_MAX_SECTORS); 157 blk_queue_max_sectors(q, BLK_SAFE_MAX_SECTORS);
158 158
159 /* 159 /*
160 * If the caller didn't supply a lock, fall back to our embedded 160 * If the caller didn't supply a lock, fall back to our embedded
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index 1fb6c3135fc8..a7ecb43b16ab 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -753,8 +753,8 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
753 blk_queue_make_request(queue, ps3vram_make_request); 753 blk_queue_make_request(queue, ps3vram_make_request);
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, MAX_SEGMENT_SIZE); 756 blk_queue_max_segment_size(queue, BLK_MAX_SEGMENT_SIZE);
757 blk_queue_max_sectors(queue, SAFE_MAX_SECTORS); 757 blk_queue_max_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/include/linux/blkdev.h b/include/linux/blkdev.h
index c051cea2df07..5d378627f446 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1016,11 +1016,15 @@ extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
1016#define MAX_PHYS_SEGMENTS 128 1016#define MAX_PHYS_SEGMENTS 128
1017#define MAX_HW_SEGMENTS 128 1017#define MAX_HW_SEGMENTS 128
1018#define SAFE_MAX_SECTORS 255 1018#define SAFE_MAX_SECTORS 255
1019#define BLK_DEF_MAX_SECTORS 1024
1020
1021#define MAX_SEGMENT_SIZE 65536 1019#define MAX_SEGMENT_SIZE 65536
1022 1020
1023#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL 1021enum blk_default_limits {
1022 BLK_MAX_SEGMENTS = 128,
1023 BLK_SAFE_MAX_SECTORS = 255,
1024 BLK_DEF_MAX_SECTORS = 1024,
1025 BLK_MAX_SEGMENT_SIZE = 65536,
1026 BLK_SEG_BOUNDARY_MASK = 0xFFFFFFFFUL,
1027};
1024 1028
1025#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) 1029#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
1026 1030