Commit eb28d31b authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Jens Axboe

block: Add BLK_ prefix to definitions

Add a BLK_ prefix to block layer constants.
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent e751e76a
...@@ -94,7 +94,7 @@ void blk_set_default_limits(struct queue_limits *lim) ...@@ -94,7 +94,7 @@ void blk_set_default_limits(struct queue_limits *lim)
lim->max_phys_segments = MAX_PHYS_SEGMENTS; lim->max_phys_segments = MAX_PHYS_SEGMENTS;
lim->max_hw_segments = MAX_HW_SEGMENTS; lim->max_hw_segments = MAX_HW_SEGMENTS;
lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK; lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
lim->max_segment_size = MAX_SEGMENT_SIZE; lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
lim->max_sectors = BLK_DEF_MAX_SECTORS; lim->max_sectors = BLK_DEF_MAX_SECTORS;
lim->max_hw_sectors = INT_MAX; lim->max_hw_sectors = INT_MAX;
lim->max_discard_sectors = 0; lim->max_discard_sectors = 0;
...@@ -154,7 +154,7 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn) ...@@ -154,7 +154,7 @@ void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
q->unplug_timer.data = (unsigned long)q; q->unplug_timer.data = (unsigned long)q;
blk_set_default_limits(&q->limits); blk_set_default_limits(&q->limits);
blk_queue_max_sectors(q, SAFE_MAX_SECTORS); blk_queue_max_sectors(q, BLK_SAFE_MAX_SECTORS);
/* /*
* If the caller didn't supply a lock, fall back to our embedded * If the caller didn't supply a lock, fall back to our embedded
......
...@@ -753,8 +753,8 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev) ...@@ -753,8 +753,8 @@ static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev)
blk_queue_make_request(queue, ps3vram_make_request); blk_queue_make_request(queue, ps3vram_make_request);
blk_queue_max_phys_segments(queue, MAX_PHYS_SEGMENTS); blk_queue_max_phys_segments(queue, MAX_PHYS_SEGMENTS);
blk_queue_max_hw_segments(queue, MAX_HW_SEGMENTS); blk_queue_max_hw_segments(queue, MAX_HW_SEGMENTS);
blk_queue_max_segment_size(queue, MAX_SEGMENT_SIZE); blk_queue_max_segment_size(queue, BLK_MAX_SEGMENT_SIZE);
blk_queue_max_sectors(queue, SAFE_MAX_SECTORS); blk_queue_max_sectors(queue, BLK_SAFE_MAX_SECTORS);
gendisk = alloc_disk(1); gendisk = alloc_disk(1);
if (!gendisk) { if (!gendisk) {
......
...@@ -1016,11 +1016,15 @@ extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm); ...@@ -1016,11 +1016,15 @@ extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
#define MAX_PHYS_SEGMENTS 128 #define MAX_PHYS_SEGMENTS 128
#define MAX_HW_SEGMENTS 128 #define MAX_HW_SEGMENTS 128
#define SAFE_MAX_SECTORS 255 #define SAFE_MAX_SECTORS 255
#define BLK_DEF_MAX_SECTORS 1024
#define MAX_SEGMENT_SIZE 65536 #define MAX_SEGMENT_SIZE 65536
#define BLK_SEG_BOUNDARY_MASK 0xFFFFFFFFUL enum blk_default_limits {
BLK_MAX_SEGMENTS = 128,
BLK_SAFE_MAX_SECTORS = 255,
BLK_DEF_MAX_SECTORS = 1024,
BLK_MAX_SEGMENT_SIZE = 65536,
BLK_SEG_BOUNDARY_MASK = 0xFFFFFFFFUL,
};
#define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment