diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2010-02-26 00:20:39 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-26 07:58:08 -0500 |
commit | 8a78362c4eefc1deddbefe2c7f38aabbc2429d6b (patch) | |
tree | c095d95af1aec0f9cee5975b1dcdc6bc1d17d401 /include/linux/blkdev.h | |
parent | 086fa5ff0854c676ec333760f4c0154b3b242616 (diff) |
block: Consolidate phys_segment and hw_segment limits
Except for SCSI no device drivers distinguish between physical and
hardware segment limits. Consolidate the two into a single segment
limit.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 57bc48446e92..ebd22dbed861 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -316,8 +316,7 @@ struct queue_limits { | |||
316 | unsigned int discard_alignment; | 316 | unsigned int discard_alignment; |
317 | 317 | ||
318 | unsigned short logical_block_size; | 318 | unsigned short logical_block_size; |
319 | unsigned short max_hw_segments; | 319 | unsigned short max_segments; |
320 | unsigned short max_phys_segments; | ||
321 | 320 | ||
322 | unsigned char misaligned; | 321 | unsigned char misaligned; |
323 | unsigned char discard_misaligned; | 322 | unsigned char discard_misaligned; |
@@ -929,8 +928,19 @@ static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int m | |||
929 | blk_queue_max_hw_sectors(q, max); | 928 | blk_queue_max_hw_sectors(q, max); |
930 | } | 929 | } |
931 | 930 | ||
932 | extern void blk_queue_max_phys_segments(struct request_queue *, unsigned short); | 931 | extern void blk_queue_max_segments(struct request_queue *, unsigned short); |
933 | extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short); | 932 | |
933 | static inline void blk_queue_max_phys_segments(struct request_queue *q, unsigned short max) | ||
934 | { | ||
935 | blk_queue_max_segments(q, max); | ||
936 | } | ||
937 | |||
938 | static inline void blk_queue_max_hw_segments(struct request_queue *q, unsigned short max) | ||
939 | { | ||
940 | blk_queue_max_segments(q, max); | ||
941 | } | ||
942 | |||
943 | |||
934 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); | 944 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
935 | extern void blk_queue_max_discard_sectors(struct request_queue *q, | 945 | extern void blk_queue_max_discard_sectors(struct request_queue *q, |
936 | unsigned int max_discard_sectors); | 946 | unsigned int max_discard_sectors); |
@@ -1055,14 +1065,9 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) | |||
1055 | return q->limits.max_hw_sectors; | 1065 | return q->limits.max_hw_sectors; |
1056 | } | 1066 | } |
1057 | 1067 | ||
1058 | static inline unsigned short queue_max_hw_segments(struct request_queue *q) | 1068 | static inline unsigned short queue_max_segments(struct request_queue *q) |
1059 | { | ||
1060 | return q->limits.max_hw_segments; | ||
1061 | } | ||
1062 | |||
1063 | static inline unsigned short queue_max_phys_segments(struct request_queue *q) | ||
1064 | { | 1069 | { |
1065 | return q->limits.max_phys_segments; | 1070 | return q->limits.max_segments; |
1066 | } | 1071 | } |
1067 | 1072 | ||
1068 | static inline unsigned int queue_max_segment_size(struct request_queue *q) | 1073 | static inline unsigned int queue_max_segment_size(struct request_queue *q) |