You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Jens Axboe
parent
086fa5ff08
commit
8a78362c4e
+2
-6
@@ -206,8 +206,7 @@ static inline int ll_new_hw_segment(struct request_queue *q,
|
||||
{
|
||||
int nr_phys_segs = bio_phys_segments(q, bio);
|
||||
|
||||
if (req->nr_phys_segments + nr_phys_segs > queue_max_hw_segments(q) ||
|
||||
req->nr_phys_segments + nr_phys_segs > queue_max_phys_segments(q)) {
|
||||
if (req->nr_phys_segments + nr_phys_segs > queue_max_segments(q)) {
|
||||
req->cmd_flags |= REQ_NOMERGE;
|
||||
if (req == q->last_merge)
|
||||
q->last_merge = NULL;
|
||||
@@ -300,10 +299,7 @@ static int ll_merge_requests_fn(struct request_queue *q, struct request *req,
|
||||
total_phys_segments--;
|
||||
}
|
||||
|
||||
if (total_phys_segments > queue_max_phys_segments(q))
|
||||
return 0;
|
||||
|
||||
if (total_phys_segments > queue_max_hw_segments(q))
|
||||
if (total_phys_segments > queue_max_segments(q))
|
||||
return 0;
|
||||
|
||||
/* Merge is OK... */
|
||||
|
||||
Reference in New Issue
Block a user