From: Andreas Dilger <adilger@turbolinux.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] EXT2-fs panic (device lvm(58,0)):
Date: Wed, 7 Mar 2001 12:57:55 -0700 (MST) [thread overview]
Message-ID: <200103071957.f27Jvue20056@webber.adilger.net> (raw)
In-Reply-To: <3AA65DD7.B1256051@mbsmm.com> from Bill Clark at "Mar 7, 2001 11:12:07 am"
Bill Clark writes:
> Not sure if this is a LVM problem or a ext2fs problem. It is happening
> with the 2.4.2 kernel and the 0.9 release of the LVM user tools.
>
> kernel: Kernel panic: EXT2-fs panic (device lvm(58,0)):
> load_block_bitmap: block_group >= groups_count - block_group = 131071,
> groups_count = 24
>
> There is a 1gig+ file on the filesystem, and most operations on it seem
> to bring about the error.
This sounds like an ext2 problem. Can you send the output of "dumpe2fs"
so I can at least know what sort of filesystem parameters there are?
Also, the output from debugfs "stat <inode_number>" would help as well.
Basically, the error you are getting is impossible. In all calls to
load_block_bitmap(), the "group number" is either checked directly, or
"block" (which is what is used to find "group number") is checked to be <
s_blocks_count, so by inference should return a valid group number.
The only remote possibility is in ext2_free_blocks() if block+count
overflows a 32-bit unsigned value. Only 2 places call ext2_free_blocks()
with a count != 1, and ext2_free_data() looks to be OK. The other
possibility is that i_prealloc_count is bogus - that is it! Nowhere
is i_prealloc_count initialized to zero AFAICS. On most filesystems,
this would return a "freeing blocks not in datazone" error (which ISTR
is reported on l-k on occasion), but in your case the filesystem is
large enough to have a valid block number. Try this patch and let me
know if it works, so I can submit it.
Failing that, can you change the panic() call in ext2_panic() to a BUG()
so we can get a stack trace to see how we get into this situation? KDB
would be even better, since it would also tell us the function parameters.
Cheers, Andreas
==========================================================================
diff -ru linux/fs/ext2/ialloc.c.orig linux/fs/ext2/ialloc.c
--- linux/fs/ext2/ialloc.c.orig Fri Dec 8 18:35:54 2000
+++ linux/fs/ext2/ialloc.c Wed Mar 7 12:22:11 2001
@@ -432,6 +444,7 @@
inode->u.ext2_i.i_file_acl = 0;
inode->u.ext2_i.i_dir_acl = 0;
inode->u.ext2_i.i_dtime = 0;
+ inode->u.ext2_i.i_prealloc_count = 0;
inode->u.ext2_i.i_block_group = i;
if (inode->u.ext2_i.i_flags & EXT2_SYNC_FL)
inode->i_flags |= S_SYNC;
diff -ru linux/fs/ext2/inode.c.orig linux/fs/ext2/inode.c
--- linux/fs/ext2/inode.c.orig Tue Jan 16 01:29:29 2001
+++ linux/fs/ext2/inode.c Wed Mar 7 12:05:47 2001
@@ -1048,6 +1038,7 @@
}
inode->i_generation = le32_to_cpu(raw_inode->i_generation);
inode->u.ext2_i.i_block_group = block_group;
+ inode->u.ext2_i.i_prealloc_count = 0;
/*
* NOTE! The in-memory inode i_data array is in little-endian order
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
next prev parent reply other threads:[~2001-03-07 19:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-07 16:12 [linux-lvm] EXT2-fs panic (device lvm(58,0)): Bill Clark
2001-03-07 19:57 ` Andreas Dilger [this message]
2001-03-07 21:05 ` Bill Clark
2001-03-08 5:52 ` Andreas Dilger
2001-03-08 14:53 ` Bill Clark
2001-03-08 16:46 ` Andreas Dilger
2001-03-09 13:27 ` Bill Clark
2001-03-11 21:23 ` Falcon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200103071957.f27Jvue20056@webber.adilger.net \
--to=adilger@turbolinux.com \
--cc=linux-lvm@sistina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).