2007-10-24 13:16:19

by Andy Whitcroft

[permalink] [raw]
Subject: 2.6.23-git18: ext2_check_page: bad entry in directory

Seems that we are now getting strange errors mounting an ext2 root
filesystem under 2.6.23-git18:

EXT2-fs error (device sda1): ext2_check_page: bad entry in directory #2:
rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
name_len=0

This seems to be occuring consistently since 2.6.23-git18. I have been
back and rerun a -git17 job to confirm its not visible at that level.
This bug is expressing itself in 2.6.23-rc1 also.

I am suspicious of this commit in the -git17 -> -git18 block:

commit 89910cccb8fec0c1140d33a743e72a712efd4f05
Author: Jan Kara <[email protected]>
Date: Sun Oct 21 16:41:40 2007 -0700

ext2: avoid rec_len overflow with 64KB block size

/me goes debug this a bit more.

Jan?

-apw


2007-10-24 13:34:17

by Jan Kara

[permalink] [raw]
Subject: Re: 2.6.23-git18: ext2_check_page: bad entry in directory

Hello,

On Wed 24-10-07 14:15:40, Andy Whitcroft wrote:
> Seems that we are now getting strange errors mounting an ext2 root
> filesystem under 2.6.23-git18:
>
> EXT2-fs error (device sda1): ext2_check_page: bad entry in directory #2:
> rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
> name_len=0
Hmm, zero length entry in a root directory. Not nice.

> This seems to be occuring consistently since 2.6.23-git18. I have been
> back and rerun a -git17 job to confirm its not visible at that level.
> This bug is expressing itself in 2.6.23-rc1 also.
>
> I am suspicious of this commit in the -git17 -> -git18 block:
>
> commit 89910cccb8fec0c1140d33a743e72a712efd4f05
> Author: Jan Kara <[email protected]>
> Date: Sun Oct 21 16:41:40 2007 -0700
>
> ext2: avoid rec_len overflow with 64KB block size
>
> /me goes debug this a bit more.
Hmm, I'd suspect that too ;) But I swear I actually tested the code ;)
So what are you using the filesystem for (or do you get the error
immediately when mounting)? How large is the filesystem?

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR

2007-10-24 14:35:17

by Andy Whitcroft

[permalink] [raw]
Subject: Re: 2.6.23-git18: ext2_check_page: bad entry in directory

On Wed, Oct 24, 2007 at 03:59:00PM +0200, Jan Kara wrote:
> Hello,
>
> On Wed 24-10-07 14:15:40, Andy Whitcroft wrote:
> > Seems that we are now getting strange errors mounting an ext2 root
> > filesystem under 2.6.23-git18:
> >
> > EXT2-fs error (device sda1): ext2_check_page: bad entry in directory #2:
> > rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
> > name_len=0
> Hmm, zero length entry in a root directory. Not nice.
>
> > This seems to be occuring consistently since 2.6.23-git18. I have been
> > back and rerun a -git17 job to confirm its not visible at that level.
> > This bug is expressing itself in 2.6.23-rc1 also.
> >
> > I am suspicious of this commit in the -git17 -> -git18 block:
> >
> > commit 89910cccb8fec0c1140d33a743e72a712efd4f05
> > Author: Jan Kara <[email protected]>
> > Date: Sun Oct 21 16:41:40 2007 -0700
> >
> > ext2: avoid rec_len overflow with 64KB block size
> >
> > /me goes debug this a bit more.
> Hmm, I'd suspect that too ;) But I swear I actually tested the code ;)
> So what are you using the filesystem for (or do you get the error
> immediately when mounting)? How large is the filesystem?

Its the root filesystem, so thats all she wrote. The kernel fails to
mount it and the world ends. Its pretty small in now world terms.

/dev/sda1 17G 10G 6.0G 63% /

-apw

2007-10-24 14:38:20

by Jan Kara

[permalink] [raw]
Subject: Re: 2.6.23-git18: ext2_check_page: bad entry in directory

On Wed 24-10-07 15:33:08, Andy Whitcroft wrote:
> On Wed, Oct 24, 2007 at 03:59:00PM +0200, Jan Kara wrote:
> > Hello,
> >
> > On Wed 24-10-07 14:15:40, Andy Whitcroft wrote:
> > > Seems that we are now getting strange errors mounting an ext2 root
> > > filesystem under 2.6.23-git18:
> > >
> > > EXT2-fs error (device sda1): ext2_check_page: bad entry in directory #2:
> > > rec_len is smaller than minimal - offset=0, inode=0, rec_len=0,
> > > name_len=0
> > Hmm, zero length entry in a root directory. Not nice.
> >
> > > This seems to be occuring consistently since 2.6.23-git18. I have been
> > > back and rerun a -git17 job to confirm its not visible at that level.
> > > This bug is expressing itself in 2.6.23-rc1 also.
> > >
> > > I am suspicious of this commit in the -git17 -> -git18 block:
> > >
> > > commit 89910cccb8fec0c1140d33a743e72a712efd4f05
> > > Author: Jan Kara <[email protected]>
> > > Date: Sun Oct 21 16:41:40 2007 -0700
> > >
> > > ext2: avoid rec_len overflow with 64KB block size
> > >
> > > /me goes debug this a bit more.
> > Hmm, I'd suspect that too ;) But I swear I actually tested the code ;)
> > So what are you using the filesystem for (or do you get the error
> > immediately when mounting)? How large is the filesystem?
>
> Its the root filesystem, so thats all she wrote. The kernel fails to
> mount it and the world ends. Its pretty small in now world terms.
>
> /dev/sda1 17G 10G 6.0G 63% /
OK, could you send me the metadata from the filesystem?

e2image -r /dev/sda1 - | gzip -dc root-image.gz

Thanks.
Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR

2007-10-24 17:08:24

by Andy Whitcroft

[permalink] [raw]
Subject: Re: 2.6.23-git18: ext2_check_page: bad entry in directory

On Wed, Oct 24, 2007 at 05:03:03PM +0200, Jan Kara wrote:

> e2image -r /dev/sda1 - | gzip -dc root-image.gz

This thing is 27MB, I'll try and find some space to hold it and
let you know where it is offlist.

-apw

2007-10-30 13:18:49

by Jan Kara

[permalink] [raw]
Subject: Re: 2.6.23-git18: ext2_check_page: bad entry in directory

On Wed 24-10-07 18:07:29, Andy Whitcroft wrote:
> On Wed, Oct 24, 2007 at 05:03:03PM +0200, Jan Kara wrote:
>
> > e2image -r /dev/sda1 - | gzip -dc root-image.gz
>
> This thing is 27MB, I'll try and find some space to hold it and
> let you know where it is offlist.
Just for info, 2.6.23+my ext2 patch works correctly on your image.
So it must be some bad interaction with other patches or merge problem or
something like that. Going to investigate more...

Honza

--
Jan Kara <[email protected]>
SUSE Labs, CR

2007-10-31 15:31:56

by Jan Kara

[permalink] [raw]
Subject: Re: 2.6.23-git18: ext2_check_page: bad entry in directory

On Wed 24-10-07 18:07:29, Andy Whitcroft wrote:
> On Wed, Oct 24, 2007 at 05:03:03PM +0200, Jan Kara wrote:
>
> > e2image -r /dev/sda1 - | gzip -dc root-image.gz
>
> This thing is 27MB, I'll try and find some space to hold it and
> let you know where it is offlist.
The filesystem mounts just fine on my test machine under latest
kernel tree from git. So, do you still see the problem? What is your
hardware setup? Anything unusual I should be aware of?
It seems (from the error message) as if we simply read a page full
of zeros from the root directory so it may be also a problem somewhere
else...

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR

2007-11-01 17:11:30

by Andy Whitcroft

[permalink] [raw]
Subject: Re: 2.6.23-git18: ext2_check_page: bad entry in directory

On Wed, Oct 31, 2007 at 04:30:43PM +0100, Jan Kara wrote:
> On Wed 24-10-07 18:07:29, Andy Whitcroft wrote:
> > On Wed, Oct 24, 2007 at 05:03:03PM +0200, Jan Kara wrote:
> >
> > > e2image -r /dev/sda1 - | gzip -dc root-image.gz
> >
> > This thing is 27MB, I'll try and find some space to hold it and
> > let you know where it is offlist.
> The filesystem mounts just fine on my test machine under latest
> kernel tree from git. So, do you still see the problem? What is your
> hardware setup? Anything unusual I should be aware of?
> It seems (from the error message) as if we simply read a page full
> of zeros from the root directory so it may be also a problem somewhere
> else...

Yes this works with the latest git tree. This problem only was visible
with 2.6.24-rc1, -git1 onwards was ok.

-apw