From: Theodore Tso <tytso@mit.edu>
To: Arthur Jones <ajones@riverbed.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: ext3: kernel BUG at fs/jbd/journal.c:412!
Date: Thu, 6 Nov 2008 12:13:22 -0500 [thread overview]
Message-ID: <20081106171322.GD18939@mit.edu> (raw)
In-Reply-To: <20081106161227.GA9254@ajones-laptop.nbttech.com>
On Thu, Nov 06, 2008 at 08:12:27AM -0800, Arthur Jones wrote:
> Hi Aneesh, ...
>
> On Thu, Nov 06, 2008 at 07:50:25AM -0800, Aneesh Kumar K.V wrote:
> > I get this with ext4-patchqueue. I guess we have some ext3 patches queued there.
>
> This could be related to a patch I just posted.
>
> See the thread on linux-ext4 called "ext3: slow symlink corruption
> on umount" for details on how this patch came about...
No this is the other ext3 patch we have in the patch tree. I see the
problem, we're calling __log_space_left in a diagnostic printk after
we've released the j_state_lock. Here's the incremental fix:
diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
index 5e856de..18e5137 100644
--- a/fs/jbd/checkpoint.c
+++ b/fs/jbd/checkpoint.c
@@ -115,7 +115,7 @@ static int __try_to_free_cp_buf(struct journal_head *jh)
*/
void __log_wait_for_space(journal_t *journal)
{
- int nblocks;
+ int nblocks, space_left;
assert_spin_locked(&journal->j_state_lock);
nblocks = jbd_space_needed(journal);
@@ -139,7 +139,8 @@ void __log_wait_for_space(journal_t *journal)
spin_lock(&journal->j_state_lock);
spin_lock(&journal->j_list_lock);
nblocks = jbd_space_needed(journal);
- if (__log_space_left(journal) < nblocks) {
+ space_left = __log_space_left(journal);
+ if (space_left < nblocks) {
int chkpt = journal->j_checkpoint_transactions != NULL;
int tid = 0;
@@ -157,8 +158,7 @@ void __log_wait_for_space(journal_t *journal)
} else {
printk(KERN_ERR "%s: needed %d blocks and "
"only had %d space available\n",
- __func__, nblocks,
- __log_space_left(journal));
+ __func__, nblocks, space_left);
printk(KERN_ERR "%s: no way to get more "
"journal space\n", __func__);
WARN_ON(1);
This is in a "should never happen path", though. What were you doing
to trigger it?
- Ted
next prev parent reply other threads:[~2008-11-06 17:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 15:50 ext3: kernel BUG at fs/jbd/journal.c:412! Aneesh Kumar K.V
2008-11-06 16:12 ` Arthur Jones
2008-11-06 16:43 ` Aneesh Kumar K.V
2008-11-06 17:13 ` Theodore Tso [this message]
2008-11-06 17:16 ` Aneesh Kumar K.V
2008-11-06 17:32 ` Theodore Tso
2008-11-06 17:38 ` Aneesh Kumar K.V
2008-11-06 17:23 ` Arthur Jones
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=20081106171322.GD18939@mit.edu \
--to=tytso@mit.edu \
--cc=ajones@riverbed.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
/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