Skip to contentSkip to conversation

"attempt to access beyond end of device" on ide-scsi+sr_mod in 2.6.0-test3

DISCUSSION Jakub Bogusz 1 participant 1 message Aug 14, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

I mounted my CDRW disk with isofs through ide-scsi as I used to do in Linux 2.4 (drive is CD recorder, and I'm using 2.6 for testing, so I haven't changed configuration for direct ATAPI writing). I successfully read some files, but when I was trying to read more, I/O errors occurred. Kernel said:
kernel: attempt to access beyond end of device
kernel: sr0: rw=0, want=315596, limit=307404
kernel: Buffer I/O error on device sr0, logical block 78898
kernel: attempt to access beyond end of device
kernel: sr0: rw=0, want=315600, limit=307404
kernel: Buffer I/O error on device sr0, logical block 78899 [...etc., many times...]

I unmounted and mounted again the same disk and everything was OK
- I couldn't repeat that errors. That disk contained ~222MB of data.

But when I inserted _larger_ CD (over 500MB of data) and tried to read some files, I/O errors happened again:
kernel: attempt to access beyond end of device
kernel: sr0: rw=0, want=1270892, limit=453448
kernel: Buffer I/O error on device sr0, logical block 317722
kernel: attempt to access beyond end of device
kernel: sr0: rw=0, want=1270896, limit=453448
kernel: Buffer I/O error on device sr0, logical block 317723 [...]

But see - now limit matches the _previous_ disk! unmounting and mounting the same disk helped again. (I've made even more tests to confirm this)

It seems that kernel updates some device block count too late (after some data reads?), remembering count for _previous_ mounted disk, not the current one.

This behaviour is specific for sr_mod and/or ide-scsi. When I mounted CD through plain ide-cd, such errors didn't happen.

PS. please Cc answers to me

Signature · 2 lines
Jakub Bogusz    http://cyber.cs.net.pl/~qboosh/
PLD Linux       http://www.pld-linux.org/