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 /block/blk-merge.c | |
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 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 99cb5cf1f447..5e7dc9973458 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c | |||
@@ -206,8 +206,7 @@ static inline int ll_new_hw_segment(struct request_queue *q, | |||
206 | { | 206 | { |
207 | int nr_phys_segs = bio_phys_segments(q, bio); | 207 | int nr_phys_segs = bio_phys_segments(q, bio); |
208 | 208 | ||
209 | if (req->nr_phys_segments + nr_phys_segs > queue_max_hw_segments(q) || | 209 | if (req->nr_phys_segments + nr_phys_segs > queue_max_segments(q)) { |
210 | req->nr_phys_segments + nr_phys_segs > queue_max_phys_segments(q)) { | ||
211 | req->cmd_flags |= REQ_NOMERGE; | 210 | req->cmd_flags |= REQ_NOMERGE; |
212 | if (req == q->last_merge) | 211 | if (req == q->last_merge) |
213 | q->last_merge = NULL; | 212 | q->last_merge = NULL; |
@@ -300,10 +299,7 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req, | |||
300 | total_phys_segments--; | 299 | total_phys_segments--; |
301 | } | 300 | } |
302 | 301 | ||
303 | if (total_phys_segments > queue_max_phys_segments(q)) | 302 | if (total_phys_segments > queue_max_segments(q)) |
304 | return 0; | ||
305 | |||
306 | if (total_phys_segments > queue_max_hw_segments(q)) | ||
307 | return 0; | 303 | return 0; |
308 | 304 | ||
309 | /* Merge is OK... */ | 305 | /* Merge is OK... */ |