public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mario Holbe <Mario.Holbe@TU-Ilmenau.DE>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4: "access beyond end of device" after ext2 mount
Date: Tue, 18 Jan 2005 09:20:22 +0100	[thread overview]
Message-ID: <20050118082022.GA2839@darkside.22.kls.lan> (raw)
In-Reply-To: <20050117194635.GD22202@logos.cnet>

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.

root@darkside:~# 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)
root@darkside:~# hdparm -a 0 /dev/hdg

/dev/hdg:
 setting fs readahead to 0
 readahead    =  0 (off)
root@darkside:~# mount -t ext3 -o ro /dev/hdg7 /mnt
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
root@darkside:~# umount /dev/hdg7
root@darkside:~# hdparm -a 0 /dev/hdg

/dev/hdg:
 setting fs readahead to 0
 readahead    =  0 (off)
root@darkside:~# 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)
root@darkside:~#

> So maybe an off-by-one read-ahead?

Please also note dd's output: 9992366 vs. 9992360 records.

root@darkside:~# cat /proc/partitions
...
  34     7    4996183 hdg7 156620 6088613 19984760 368240 3 0 24 0 0 190720 368240
...
root@darkside:~# bc
4996183 * 2
9992366
root@darkside:~# tune2fs -l /dev/hdg7
...
Block count:              1249045
...
root@darkside:~# 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.

root@darkside:~# 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)
root@darkside:~#

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

  reply	other threads:[~2005-01-18  8:20 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-15 23:35 2.4: "access beyond end of device" after ext2 mount Mario Holbe
2005-01-17 19:46 ` Marcelo Tosatti
2005-01-18  8:20   ` Mario Holbe [this message]
2005-01-18 10:55   ` Andries Brouwer
2005-01-18  8:45     ` Marcelo Tosatti
2005-01-18 12:15       ` Mario Holbe
2005-01-18 12:37       ` Andries Brouwer
2005-01-18 10:20         ` Marcelo Tosatti
2005-01-18 11:47     ` Mario Holbe
2005-01-18 12:39       ` Andries Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2005-01-18 13:42 Piszcz, Justin Michael
2005-01-18 14:02 ` Mario Holbe
2005-01-18 14:17   ` Sytse Wielinga
2005-01-18 15:20     ` Mario Holbe
2005-01-18 15:55       ` Sytse Wielinga
2005-01-18 16:12         ` Sytse Wielinga
2005-01-18 14:05 Piszcz, Justin Michael
2005-01-18 14:15 ` Mario Holbe
2005-01-18 14:24 Piszcz, Justin Michael
2005-01-18 15:03 ` Andries Brouwer
2005-01-18 15:29 ` Mario Holbe
2005-01-18 15:07 Piszcz, Justin Michael
2005-01-18 15:42 ` Mario Holbe
     [not found] <fa.f2nt105.94e81t@ifi.uio.no>
     [not found] ` <fa.ihdogs4.bjglrq@ifi.uio.no>
2005-01-21 12:11   ` Bodo Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050118082022.GA2839@darkside.22.kls.lan \
    --to=mario.holbe@tu-ilmenau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox