public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.4: "access beyond end of device" after ext2 mount
@ 2005-01-15 23:35 Mario Holbe
  2005-01-17 19:46 ` Marcelo Tosatti
  0 siblings, 1 reply; 24+ messages in thread
From: Mario Holbe @ 2005-01-15 23:35 UTC (permalink / raw)
  To: linux-kernel

Hello,

mounting an ext2 (ext3 as well) filesystem seems to modify the
block device's EOF behaviour: before the mount the device returned
EOF, after the mount it doesn't anymore:

[on a fresh booted system]
root@darkside:~# uname -a
Linux darkside 2.4.27 #1 Sat Jan 15 17:07:20 CET 2005 i686 GNU/Linux
root@darkside:~# dd if=/dev/hdg7 of=/dev/null
9992366+0 records in
9992366+0 records out
5116091392 bytes transferred in 87,157394 seconds (58699453 bytes/sec)
root@darkside:~# mke2fs /dev/hdg7
...
Block size=4096 (log=2)
Fragment size=4096 (log=2)
625248 inodes, 1249045 blocks
...
root@darkside:~# dd if=/dev/hdg7 of=/dev/null
9992366+0 records in
9992366+0 records out
5116091392 bytes transferred in 87,439332 seconds (58510184 bytes/sec)
root@darkside:~# mount -t ext2 -o ro /dev/hdg7 /mnt
root@darkside:~# umount /dev/hdg7
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 87,145443 seconds (58707468 bytes/sec)
root@darkside:~# bc
1249045 * 4
4996180
1249045 * 4 * 2
9992360

Could somebody please explain this to me? Is this intentional?
I could partly imagine the ext2 mount shrinking the block device's
boundaries to the filesystem boundaries - for security reasons perhaps,
even if I personally think this isn't the best idea at all, since it
would violate layers encapsulation.
However, I have no idea why a) if so, this is not reverted at least
on umount and why b) the EOF behaviour of the block device changes -
before there were an EOF sent to the application (dd) while after there
isn't, but an I/O error instead.

Kernel is Debian's kernel-source-2.4.27 + kernel-patch-2.4-i2c +
kernel-patch-2.4-lm-sensors.

It seems there were already some mails regarding this issue suggesting
this could have shown up between 2.4.24 and 2.4.25, but it seems they
were misunderstood, for example:

From: "ProNIC Solutions" <mot@pronicsolutions.com>
Subject: 2.4.25: attempt to access beyond end of device
Date: Tue, 16 Mar 2004 09:06:31 -0500
Message-ID: <005201c40b5f$e21d34a0$0600a8c0@p17>

From: "Peter S. Mazinger" <ps.m@gmx.net>
Subject: BUG in 2.4.25-rc1: attempt to access beyond end of device
Date: Fri, 6 Feb 2004 13:53:40 +0100 (CET)
Message-ID: <Pine.LNX.4.44.0402061347160.27376-100000@lnx.bridge.intra>


regards
   Mario
-- 
Independence Day: Fortunately, the alien computer operating system works just
fine with the laptop. This proves an important point which Apple enthusiasts
have known for years. While the evil empire of Microsoft may dominate the
computers of Earth people, more advanced life forms clearly prefer Mac's.

^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: 2.4: "access beyond end of device" after ext2 mount
@ 2005-01-18 13:42 Piszcz, Justin Michael
  2005-01-18 14:02 ` Mario Holbe
  0 siblings, 1 reply; 24+ messages in thread
From: Piszcz, Justin Michael @ 2005-01-18 13:42 UTC (permalink / raw)
  To: Marcelo Tosatti, Andries Brouwer; +Cc: Mario Holbe, linux-kernel

Normally, this problem associated with drives over 32GB or 127GB on a
controller that cannot support it.  It was not discussed here, I was
wondering if that is the problem, if it is not, what type of Hard Drive
is giving you these problems?

Thanks.


-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of Marcelo Tosatti
Sent: Tuesday, January 18, 2005 5:20 AM
To: Andries Brouwer
Cc: Mario Holbe; linux-kernel@vger.kernel.org
Subject: Re: 2.4: "access beyond end of device" after ext2 mount

On Tue, Jan 18, 2005 at 01:37:08PM +0100, Andries Brouwer wrote:
> On Tue, Jan 18, 2005 at 06:45:26AM -0200, Marcelo Tosatti wrote:
> 
> > > I suppose that what happens is the following:
> > > mounting sets the blocksize to 4096.
> > > After reading 9992360 sectors, reading the next block means
reading
> > > the next 8 sectors and that fails because only 6 sectors are left.
> > 
> > So this is either not a Linux error and not a disk error, its just
that the
> > "use with filesystem" then "direct access" is a unfortunate
combination.
> 
> It is not a disk error, but I consider it a Linux error.

OK.

> > What would be the correct fix for this for this, if any?
> 
> For 2.4 my reaction would be to say that it is a known property
> of the system, possibly less fortunate, an unimportant flaw.

This seems to be harmless, so, better do nothing about it.

> Of course a fix is possible if this is deemed important for some
reason.
> 
> > v2.6 should suffer from the same issues?
> 
> I don't think so. But 2.6 details are rather different.

OK!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: 2.4: "access beyond end of device" after ext2 mount
@ 2005-01-18 14:05 Piszcz, Justin Michael
  2005-01-18 14:15 ` Mario Holbe
  0 siblings, 1 reply; 24+ messages in thread
From: Piszcz, Justin Michael @ 2005-01-18 14:05 UTC (permalink / raw)
  To: Mario Holbe; +Cc: Marcelo Tosatti, Andries Brouwer, linux-kernel

Okay but what hard drive model and IDE Chipset/Controller are you using?

Thanks!

-----Original Message-----
From: Mario Holbe [mailto:Mario.Holbe@TU-Ilmenau.DE] 
Sent: Tuesday, January 18, 2005 9:02 AM
To: Piszcz, Justin Michael
Cc: Marcelo Tosatti; Andries Brouwer; linux-kernel@vger.kernel.org
Subject: Re: 2.4: "access beyond end of device" after ext2 mount

On Tue, Jan 18, 2005 at 08:42:08AM -0500, Piszcz, Justin Michael wrote:
> Normally, this problem associated with drives over 32GB or 127GB on a
> controller that cannot support it.  It was not discussed here, I was
> wondering if that is the problem, if it is not, what type of Hard
Drive
> is giving you these problems?

This does not depend on the type of the hard disk for sure.

root@darkside:/dev/shm# dd if=/dev/zero of=foo bs=1024 count=10001
10001+0 records in
10001+0 records out
10241024 bytes transferred in 0,062195 seconds (164659895 bytes/sec)
root@darkside:/dev/shm# losetup /dev/loop0 foo
loop: loaded (max 8 devices)
root@darkside:/dev/shm# mke2fs -b 4096 /dev/loop0
...
root@darkside:/dev/shm# blockdev --getbsz /dev/loop0
1024
root@darkside:/dev/shm# dd if=/dev/loop0 of=/dev/null
20002+0 records in
20002+0 records out
10241024 bytes transferred in 0,248255 seconds (41252031 bytes/sec)
root@darkside:/dev/shm# mount -o ro /dev/loop0 /mnt
root@darkside:/dev/shm# umount /dev/loop0
root@darkside:/dev/shm# blockdev --getbsz /dev/loop0
4096
root@darkside:/dev/shm# dd if=/dev/loop0 of=/dev/null
attempt to access beyond end of device
07:00: rw=0, want=10004, limit=10001
dd: reading `/dev/loop0': Input/output error
20000+0 records in
20000+0 records out
10240000 bytes transferred in 0,185949 seconds (55068833 bytes/sec)

Of course you could reproduce it much more simple without all
the ext2 stuff using blockdev --setbsz :)


Mario
-- 
() Ascii Ribbon Campaign
/\ Support plain text e-mail

^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: 2.4: "access beyond end of device" after ext2 mount
@ 2005-01-18 14:24 Piszcz, Justin Michael
  2005-01-18 15:03 ` Andries Brouwer
  2005-01-18 15:29 ` Mario Holbe
  0 siblings, 2 replies; 24+ messages in thread
From: Piszcz, Justin Michael @ 2005-01-18 14:24 UTC (permalink / raw)
  To: Mario Holbe; +Cc: linux-kernel

Is the problem with the drive on the promise board or the drive on the
VIA chipset?

(from google)
Soyo SY-7VBA133U VIA 694T SY-7VBA133U : ComputerHQ.com3
... Main Specifications. Product Description, SOYO Socket 370
SY-7VBA133U - mainboard -
ATX - Pro133T. ... Audio Output, Sound card - VIA VT82C686B - 16-bit -
stereo. ...

I have the -EXACT- same chipset on an older Soyo Motherboard and have
the same problem you are having, the motherboard did not support drives
over 32GB or it was because I had the 32GB clip (pins on the back of the
hard drive) shorted.  Did you check your HDD manual to see if you have
the 32GB clip enabled?  If so, you need to disable this.

Justin.


-----Original Message-----
From: Mario Holbe [mailto:Mario.Holbe@TU-Ilmenau.DE] 
Sent: Tuesday, January 18, 2005 9:15 AM
To: Piszcz, Justin Michael
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4: "access beyond end of device" after ext2 mount

On Tue, Jan 18, 2005 at 09:05:05AM -0500, Piszcz, Justin Michael wrote:
> Okay but what hard drive model and IDE Chipset/Controller are you
using?

VIA vt82c686b onboard
PDC20269 (Promise U133TX2) on PCI

hda: WDC WD400EB-00CPF0, ATA DISK drive
hdc: IC35L080AVVA07-0, ATA DISK drive
hdd: HL-DT-ST DVDRAM GSA-4082B, ATAPI CD/DVD-ROM drive
hdg: SAMSUNG SP1614N, ATA DISK drive

hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=4865/255/63,
UDMA(100)
hdc: 160836480 sectors (82348 MB) w/1863KiB Cache, CHS=159560/16/63,
UDMA(100)
hdg: 312581808 sectors (160042 MB) w/8192KiB Cache, CHS=19457/255/63,
UDMA(100)

However, it doesn't matter :)


Mario
-- 
<delta> talk softly and carry a keen sword

^ permalink raw reply	[flat|nested] 24+ messages in thread
* RE: 2.4: "access beyond end of device" after ext2 mount
@ 2005-01-18 15:07 Piszcz, Justin Michael
  2005-01-18 15:42 ` Mario Holbe
  0 siblings, 1 reply; 24+ messages in thread
From: Piszcz, Justin Michael @ 2005-01-18 15:07 UTC (permalink / raw)
  To: Andries Brouwer; +Cc: Mario Holbe, linux-kernel

Not trying to spread FUD, I am just explaining I had the same issue and
that was the resolution.

-----Original Message-----
From: Andries Brouwer [mailto:aebr@win.tue.nl] 
Sent: Tuesday, January 18, 2005 10:04 AM
To: Piszcz, Justin Michael
Cc: Mario Holbe; linux-kernel@vger.kernel.org
Subject: Re: 2.4: "access beyond end of device" after ext2 mount

On Tue, Jan 18, 2005 at 09:24:03AM -0500, Piszcz, Justin Michael wrote:

> Is the problem with the drive on the promise board or the drive on the
> VIA chipset?

Oh, please - no FUD. There is no problem, and we understand in detail
what happens and why it happens. There is no need for any speculation.
There is no relation to disk hardware or indeed any hardware.

> Did you check your HDD manual to see if you have
> the 32GB clip enabled?  If so, you need to disable this.

^ permalink raw reply	[flat|nested] 24+ messages in thread
[parent not found: <fa.f2nt105.94e81t@ifi.uio.no>]

end of thread, other threads:[~2005-01-21 12:11 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox