On Mon, Jan 17, 2005 at 05:46:35PM -0200, Marcelo Tosatti wrote: > On Sun, Jan 16, 2005 at 12:35:30AM +0100, Mario Holbe wrote: > > Could somebody please explain this to me? Is this intentional? > No
Thanks :) > Can you please turn readahead off (hdparm -a 0 /dev/hdg) and repeat the tests? > The kernel is trying to read one block after EOD. The same happens. [EMAIL PROTECTED]:~# dd if=/dev/hdg7 of=/dev/null 9992366+0 records in 9992366+0 records out 5116091392 bytes transferred in 117,573365 seconds (43514034 bytes/sec) [EMAIL PROTECTED]:~# hdparm -a 0 /dev/hdg /dev/hdg: setting fs readahead to 0 readahead = 0 (off) [EMAIL PROTECTED]:~# mount -t ext3 -o ro /dev/hdg7 /mnt kjournald starting. Commit interval 5 seconds EXT3-fs: mounted filesystem with ordered data mode. [EMAIL PROTECTED]:~# umount /dev/hdg7 [EMAIL PROTECTED]:~# hdparm -a 0 /dev/hdg /dev/hdg: setting fs readahead to 0 readahead = 0 (off) [EMAIL PROTECTED]:~# dd if=/dev/hdg7 of=/dev/null attempt to access beyond end of device 22:07: rw=0, want=4996184, limit=4996183 dd: reading `/dev/hdg7': Input/output error 9992360+0 records in 9992360+0 records out 5116088320 bytes transferred in 100,455251 seconds (50929028 bytes/sec) [EMAIL PROTECTED]:~# > So maybe an off-by-one read-ahead? Please also note dd's output: 9992366 vs. 9992360 records. [EMAIL PROTECTED]:~# cat /proc/partitions ... 34 7 4996183 hdg7 156620 6088613 19984760 368240 3 0 24 0 0 190720 368240 ... [EMAIL PROTECTED]:~# bc 4996183 * 2 9992366 [EMAIL PROTECTED]:~# tune2fs -l /dev/hdg7 ... Block count: 1249045 ... [EMAIL PROTECTED]:~# bc 4096 * 1249045 / 512 9992360 The block device (the partition) is 4996183 kB or 9992366 sectors, while the ext3 fs is 9992360 sectors. Exactly these 9992360 sectors could be read by dd in the second pass. [EMAIL PROTECTED]:~# dd if=/dev/hdg7 of=/dev/null bs=512 attempt to access beyond end of device 22:07: rw=0, want=4996184, limit=4996183 dd: reading `/dev/hdg7': Input/output error 9992360+0 records in 9992360+0 records out 5116088320 bytes transferred in 92,603241 seconds (55247400 bytes/sec) [EMAIL PROTECTED]:~# Fixing dd's blocksize to 512 doesn't help either. > Also I suggest a dump_stack() to see where the read is coming > from. I have no idea, how and where to do a dump_stack(). regards Mario -- () Ascii Ribbon Campaign /\ Support plain text e-mail - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/