isofs buglet in 2.0.34 + fix

Carlos Fonseca (cmfonsec@ualg.pt)
Sun, 28 Jun 1998 17:20:03 +0100 (WEST)


Dear Alan and all,

Trying to read a particular file on a PhotoCD of mine systematically
produces the following:

Jun 27 19:42:26 gaivota kernel: scsi0: MEDIUM ERROR on channel 0, id 2,
lun 0, CDB: Read (6) 00 41 b2 02 00
Jun 27 19:42:26 gaivota kernel: Current error sr0b:00: sense key Medium
Error
Jun 27 19:42:26 gaivota kernel: Additional sense indicates Random
positioning error
Jun 27 19:42:26 gaivota kernel: CD-ROM I/O error: dev 0b:00, sector 67276

The source for xpcd-2.05 includes a patch for the linux kernel which seems
to have already been merged into the main sources, except for a ">"
instead of ">=" in a comparison. The following patch lets me read that
file fine...

--- linux/fs/isofs/inode.c-2.0.34 Sat Jun 27 19:43:58 1998
+++ linux/fs/isofs/inode.c Sat Jun 27 19:45:39 1998
@@ -597,7 +597,7 @@
* If we are beyond the end of this file, don't give out any
* blocks.
*/
- if( b_off > inode->i_size )
+ if( b_off >= inode->i_size )
{
off_t max_legal_read_offset;

Please let me know you need any further info...

Cheers,

Carlos

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu