[haiku-bugs] Re: [Haiku] #15569: usb_disk stalls & unmounts when large I/O transfers are not queued

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Thu, 12 Mar 2020 20:12:42 -0000

#15569: usb_disk stalls & unmounts when large I/O transfers are not queued
--------------------------------+----------------------------
   Reporter:  X512              |      Owner:  nobody
       Type:  bug               |     Status:  new
   Priority:  normal            |  Milestone:  Unscheduled
  Component:  Drivers/Disk/USB  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------
Comment (by waddlesplash):

Yes, what FreeBSD does makes more sense, I think.

 Except FreeBSD has a global hard-coded limit of 128kB, and it seems that
 no matter what the underlying device reports, CAM caps I/O at this, so I
 guess it must do segmentation somewhere if reads are requested > 128kB.

and the upper layer should then call it again as needed (assuming it
 handles partial reads properly).

 Most upper layers interpret transferred < requested as "the end of the
 drive was reached", which is not a good idea.

 Since usb_disk is the only driver that does not use DMAResource (SCSI,
 etc.) or segment transfers manually (NVMe), it probably should be changed
 to segment transfers manually.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15569#comment:17>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: