History

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.

Martin K. Petersen committed 16 years ago

Commit 8a783621 parent 086fa5f35 files · +70 −136Browse files

Showing the changes to include/linux/blkdev.h (1 of 35 files). Show all

Unified · Split

include/linux/blkdev.h+16−11
@@ -316,8 +316,7 @@ struct queue_limits { · 315 unmodified lines
316316 unsigned int discard_alignment;
317317
318318 unsigned short logical_block_size;
319− unsigned short max_hw_segments;
320− unsigned short max_phys_segments;
319+ unsigned short max_segments;
321320
322321 unsigned char misaligned;
323322 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
929928 blk_queue_max_hw_sectors(q, max);
930929 }
931930
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+
934944 extern void blk_queue_max_segment_size(struct request_queue *, unsigned int);
935945 extern void blk_queue_max_discard_sectors(struct request_queue *q,
936946 unsigned int max_discard_sectors);
@@ -1055,14 +1065,9 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) · 118 unmodified lines
10551065 return q->limits.max_hw_sectors;
10561066 }
10571067
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)
10641069 {
1065− return q->limits.max_phys_segments;
1070+ return q->limits.max_segments;
10661071 }
10671072
10681073 static inline unsigned int queue_max_segment_size(struct request_queue *q)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t