Skip to contentSkip to conversation

2.6.23-git18: ext2_check_page: bad entry in directory

DISCUSSION Andy Whitcroft 2 participants 8 messages Oct 24, 2007 – Nov 1, 2007

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Hello,

Quoted 6 lines · Andy Whitcroft

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.

Quoted 6 lines

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:

Quoted 7 lines

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

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw
Quoted 21 lines · Jan Kara

Hello,

Quoted 6 lines · Andy Whitcroft

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.

Quoted 10 lines

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

Quoted 6 lines
Quoted 3 lines

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

#3 lore raw
Quoted 25 lines · Andy Whitcroft
Quoted 24 lines · Jan Kara

Hello,

Quoted 6 lines · Andy Whitcroft

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.

Quoted 13 lines

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.

Quoted 8 lines
Quoted 3 lines

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

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#4 lore raw
Quoted 1 line · Jan Kara

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

#5 lore raw
Quoted 6 lines · Andy Whitcroft
Quoted 1 line · Jan Kara

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

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#6 lore raw
In reply to Andy Whitcroft
Quoted 6 lines · Andy Whitcroft
Quoted 1 line · Jan Kara

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

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#7 lore raw
Quoted 5 lines · Jan Kara
Quoted 4 lines · Andy Whitcroft
Quoted 1 line · Jan Kara

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

Quoted 8 lines
Quoted 2 lines

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