Skip to contentSkip to conversation

reiserfs bug

DISCUSSION Hongwei Li 3 participants 4 messages Jul 1, 2004 – Oct 5, 2004

lore
Share & tools
lore

Hongwei Li

author
#0 lore raw

Hi:
My machine am running linux-2.4.25, it crash in the reiser_panic.
I looked at the oops and find out the followings:
check_leaf_block_head pass the 0 as "sb" value, and cause reiser_panic crash.
Any fix for this?

static void check_leaf_block_head (struct buffer_head
* bh)
{
struct block_head * blkh;
int nr;

blkh = B_BLK_HEAD (bh);
nr = blkh_nr_item(blkh);
if ( nr > (bh->b_size - BLKH_SIZE) / IH_SIZE)

    reiserfs_panic (0, "vs-6010:
check_leaf_block_head: invalid item number %z", bh);
  if ( blkh_free_space(blkh) > 
      bh->b_size - BLKH_SIZE - IH_SIZE * nr )
    reiserfs_panic (0, "vs-6020:

check_leaf_block_head: invalid free space %z", bh);

}

void reiserfs_panic (struct super_block * sb, const char * fmt, ...)
{
show_reiserfs_locks() ; do_reiserfs_warning(fmt);
printk ( KERN_EMERG "%s (device %s)\n", error_buf,
bdevname(sb->s_dev));
BUG ();

/* this is not actually called, but makes
reiserfs_panic() "noreturn" */
panic ("REISERFS: panic (device %s): %s\n",

	 sb ? kdevname(sb->s_dev) : "sb == 0", error_buf);
}

Li Hongwei

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

#1 lore raw

Hello

Quoted 8 lines · Hongwei Li

Hi:
My machine am running linux-2.4.25, it crash in the reiser_panic.
I looked at the oops and find out the followings:
check_leaf_block_head pass the 0 as "sb" value, and cause reiser_panic crash.
Any fix for this?

Actually, reiserfs_panic would panic even correct sb value were passed into it.
You seem to get reiserfs node corruption. Reiserfs used to return -EIO in such cases. Unfortunately, it is not doing that correctly everywhere. We will fix that. You should reiserfsck your filesystem. It is very likely that you will have to reiserfsck --rebuild-tree it.
Please get fresh reiserfsprogs (ftp://ftp.namesys.com/pub/reiserfsprogs/reiserfsprogs-3.6.17.tar.gz)
and let us know whether it did its job

Quoted 49 lines

static void check_leaf_block_head (struct buffer_head
* bh)
{
struct block_head * blkh;
int nr;

blkh = B_BLK_HEAD (bh);
nr = blkh_nr_item(blkh);
if ( nr > (bh->b_size - BLKH_SIZE) / IH_SIZE)

    reiserfs_panic (0, "vs-6010:
check_leaf_block_head: invalid item number %z", bh);
  if ( blkh_free_space(blkh) > 
      bh->b_size - BLKH_SIZE - IH_SIZE * nr )
    reiserfs_panic (0, "vs-6020:

check_leaf_block_head: invalid free space %z", bh);

}

void reiserfs_panic (struct super_block * sb, const char * fmt, ...)
{
show_reiserfs_locks() ; do_reiserfs_warning(fmt);
printk ( KERN_EMERG "%s (device %s)\n", error_buf,
bdevname(sb->s_dev));
BUG ();

/* this is not actually called, but makes
reiserfs_panic() "noreturn" */
panic ("REISERFS: panic (device %s): %s\n",

	 sb ? kdevname(sb->s_dev) : "sb == 0", error_buf);
}

Li Hongwei

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
In reply to Hongwei Li

Hello!

Hongwei Li <[email protected]> wrote:
HL> My machine am running linux-2.4.25, it crash in the HL> reiser_panic.
HL> I looked at the oops and find out the followings:
HL> check_leaf_block_head pass the 0 as "sb" value, and HL> cause reiser_panic crash.
HL> Any fix for this?

Well, reiserfs_panic is supposed to crash with BUG().
And the reason for the reiserfs_panic call seems to be on-disk corruption in your case.

HL> reiserfs_panic (0, "vs-6020:
HL> check_leaf_block_head: invalid free space %z", bh);

This is fine.

HL> void reiserfs_panic (struct super_block * sb, const HL> char * fmt, ...)
HL> {

HL>   show_reiserfs_locks() ;
HL>   do_reiserfs_warning(fmt);
HL>   printk ( KERN_EMERG "%s (device %s)\n", error_buf,

HL> bdevname(sb->s_dev));

This line looks this way in current bk tree:
panic ("REISERFS: panic (device %s): %s\n",

         sb ? kdevname(sb->s_dev) : "sb == 0", error_buf);

And I think it was like this for some significant time already. bk diffs output suggest that this change was in there since Feb 4th, 2002.

Are you using vanilla tree?
I seem to remember that bdevname was used early in 2.5.

Bye,
Oleg

#3 lore raw
In reply to Hongwei Li

Hello

Quoted 8 lines · Hongwei Li

Hi:
My machine am running linux-2.4.25, it crash in the reiser_panic.
I looked at the oops and find out the followings:
check_leaf_block_head pass the 0 as "sb" value, and cause reiser_panic crash.
Any fix for this?

Reiserfs found metadata corruption. It is supposed to not crash but return i/o error,

but you should reiserfsck your filesystem.

We have to improve reiserfs data corruption handling.

Quoted 48 lines

static void check_leaf_block_head (struct buffer_head
* bh)
{
struct block_head * blkh;
int nr;

blkh = B_BLK_HEAD (bh);
nr = blkh_nr_item(blkh);
if ( nr > (bh->b_size - BLKH_SIZE) / IH_SIZE)

    reiserfs_panic (0, "vs-6010:
check_leaf_block_head: invalid item number %z", bh);
  if ( blkh_free_space(blkh) > 
      bh->b_size - BLKH_SIZE - IH_SIZE * nr )
    reiserfs_panic (0, "vs-6020:

check_leaf_block_head: invalid free space %z", bh);

}

void reiserfs_panic (struct super_block * sb, const char * fmt, ...)
{
show_reiserfs_locks() ; do_reiserfs_warning(fmt);
printk ( KERN_EMERG "%s (device %s)\n", error_buf,
bdevname(sb->s_dev));
BUG ();

/* this is not actually called, but makes
reiserfs_panic() "noreturn" */
panic ("REISERFS: panic (device %s): %s\n",

	 sb ? kdevname(sb->s_dev) : "sb == 0", error_buf);
}

Li Hongwei

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/