[haiku-bugs] Re: [Haiku] #6036: Read from cd failure (ISO9660 haiku-r1-alpha2.iso)

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Tue, 01 Jun 2010 10:10:41 -0000

#6036: Read from cd failure (ISO9660 haiku-r1-alpha2.iso)
--------------------------+-------------------------------------------------
 Reporter:  aldeck        |       Owner:  mmlr     
     Type:  bug           |      Status:  assigned 
 Priority:  normal        |   Milestone:  R1       
Component:  Drivers/Disk  |     Version:  R1/alpha2
 Keywords:                |    Platform:  All      
Blockedby:                |       Patch:  0        
 Blocking:                |  
--------------------------+-------------------------------------------------

Comment(by axeld):

 I just looked into the issue: according to the linux sources, the SCSI
 spec allows the device to report up to 75 blocks beyond its actual size.
 While I did not find any mention of this in the specs (only looked at
 MMC-5/READ_CAPACITY), what they do is to check whether an access covered
 the last part of a device, and adjust the disk size on the fly then by
 evaluating the exact SCSI reply (see drivers/scsi/sr.c::sr_done() line
 257ff in 2.6.34). FreeBSD ignores the issue, so it should have the same
 issues we have.

 As a possible work-around, I would suggest issuing an additional read in
 cd_set_capacity(), and handling the error case in either periph_io(), or
 adding a dedicated function for this in scsi_cd (I would prefer the
 latter).

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6036#comment:4>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: