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
@@ -950,14 +950,14 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd)
|
||||
static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q)
|
||||
{
|
||||
if ((pd->settings.size << 9) / CD_FRAMESIZE
|
||||
<= queue_max_phys_segments(q)) {
|
||||
<= queue_max_segments(q)) {
|
||||
/*
|
||||
* The cdrom device can handle one segment/frame
|
||||
*/
|
||||
clear_bit(PACKET_MERGE_SEGS, &pd->flags);
|
||||
return 0;
|
||||
} else if ((pd->settings.size << 9) / PAGE_SIZE
|
||||
<= queue_max_phys_segments(q)) {
|
||||
<= queue_max_segments(q)) {
|
||||
/*
|
||||
* We can handle this case at the expense of some extra memory
|
||||
* copies during write operations
|
||||
|
||||
Reference in New Issue
Block a user