Except for SCSI no device drivers distinguish between physical and hardware segment limits. Consolidate the two into a single segment limit.
Showing the changes to include/linux/blkdev.h (1 of 35 files). Show all
Unified · Split
| @@ -316,8 +316,7 @@ struct queue_limits { · 315 unmodified lines | ||
| 316 | 316 | unsigned int discard_alignment; |
| 317 | 317 | |
| 318 | 318 | unsigned short logical_block_size; |
| 319 | − unsigned short max_hw_segments; | |
| 320 | − unsigned short max_phys_segments; | |
| 319 | + unsigned short max_segments; | |
| 321 | 320 | |
| 322 | 321 | unsigned char misaligned; |
| 323 | 322 | unsigned char discard_misaligned; |
| @@ -929,8 +928,19 @@ static inline void blk_queue_max_sectors(struct request_queue *q, unsigned int m · 605 unmodified lines | ||
| 929 | 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); | |
| 933 | −extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short); | |
| 931 | +extern void blk_queue_max_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 | 944 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
| 935 | 945 | extern void blk_queue_max_discard_sectors(struct request_queue *q, |
| 936 | 946 | unsigned int max_discard_sectors); |
| @@ -1055,14 +1065,9 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) · 118 unmodified lines | ||
| 1055 | 1065 | return q->limits.max_hw_sectors; |
| 1056 | 1066 | } |
| 1057 | 1067 | |
| 1058 | −static inline unsigned short queue_max_hw_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) | |
| 1068 | +static inline unsigned short queue_max_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 | 1073 | static inline unsigned int queue_max_segment_size(struct request_queue *q) |