Re: 2.4.16: hda9: attempt to access beyond end of device

Andreas Dilger (adilger@turbolabs.com)
Fri, 30 Nov 2001 15:22:07 -0700


On Nov 30, 2001 21:07 +0100, M G Berberich wrote:
> Am Thursday, den 29. November 2001 22:58:14 schrieb berberic:
> > Partition boundary problem in 2.4.16 ?!
> >
> > I just tried to make a mke2fs on my /dev/hda9 and mke2fs with kernel
> > 2.4.16 and it failed with a partial write. /var/log/messages says:
> >
> > kernel: 03:09: rw=0, want=289140, limit=289138
> > kernel: attempt to access beyond end of device
> >
> > It works fine with 2.4.13 and it works with 2.4.16 if blocksize is
> > set to 4k (fails with 1k blocks).
>
> Now it failed with kernel 2.4.13 and mke2fs 1.25 on another partition,
> but works with kernel 2.4.13 and mke2fs 1.18. 1k-blocks again.

To avoid issues with mke2fs, try "dd if=/dev/hda9 of=/dev/null bs=X"
where X=512,1k,2k,4k under both kernels and see if it still gives
errors. Also, mke2fs outputs the device size that it got via the
BLKGETSIZE ioctl, so that may be informative also. If you do an
strace of mke2fs, you should see that it is calling BLKGETSIZE (about
70 lines in, on my system). If that ioctl is failing, then it may be
a bug elsewhere in the mke2fs code (which is rarely used), although
it is unlikely.

The likely reason it is failing with 1kB blocks and not 4kB blocks is
that mke2fs will ignore up to 3kB at the end of the device if it is
not a full multiple of the block size (i.e. 4kB).

Cheers, Andreas

--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

- 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/