From: Zoltan Menyhart <Zoltan.Menyhart@bull.net>
To: linux-kernel@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>, sct@redhat.com
Subject: Re: [PATCH] Change ll_rw_block() calls in JBD
Date: Tue, 20 Jun 2006 18:33:08 +0200 [thread overview]
Message-ID: <44982344.2060507@bull.net> (raw)
In-Reply-To: <20060602134923.GA1644@atrey.karlin.mff.cuni.cz>
I have got some crashes due to:
Assertion failure in __journal_file_buffer():
"jh->b_transaction == transaction || jh->b_transaction == 0"
[<a0000002053b44e0>] __journal_file_buffer+0x420/0x7c0 [jbd]
r32 : e000000161a1f3e0 jh
r33 : e00000010396a380 transaction
r34 : 0000000000000008 jlist == BJ_Locked
*(struct journal_head *) 0xe000000161a1f3e0: // jh
{
b_bh = 0xe00000048bb36930,
b_jcount = 0x0,
b_jlist = 0x1,
b_modified = 0x0,
b_frozen_data = 0x0,
b_committed_data = 0x0,
b_transaction = 0xe0000020014adb80, // ->j_running_transaction
b_next_transaction = 0x0,
b_tnext = 0xe0000001c17306e0,
b_tprev = 0xe00000204757e540,
b_cp_transaction = 0x0,
b_cpnext = 0x0,
b_cpprev = 0x0
}
*(struct buffer_head *) 0xe00000048bb36930: // jh->b_bh
{
b_state = 0x8201d,
b_this_page = 0xe00000048bb33d88,
b_page = 0xa07ffffff9201300,
b_count = {
counter = 0x2
},
b_size = 0x1000,
b_blocknr = 0xadc001,
b_data = 0xe000000492a0e000,
b_bdev = 0xe0000023fe1ca300,
b_end_io = 0xa000000100630be0,
b_private = 0xe000000161a1f3e0,
b_assoc_buffers = {
next = 0xe00000048bb36978,
prev = 0xe00000048bb36978
}
--- Called from --- :
journal_submit_data_buffers+0x200/0x660 [jbd]
r32 : e0000001035ec100 journal
r33 : e00000010396a380 commit_transaction
As you can see, the current "jh" has been stolen for the new
"->j_running_transaction" while we released temporarily "->j_list_lock"
in the middle of "journal_submit_data_buffers()".
Therefore the test "jh->b_jlist != BJ_SyncData", i.e. if it is still
on a (_any_) sync. list is not enough.
--- linux-2.6.16.20-orig/fs/jbd/commit.c 2006-06-20 17:19:47.000000000 +0200
+++ linux-2.6.16.20/fs/jbd/commit.c 2006-06-20 17:35:54.000000000 +0200
@@ -219,15 +219,26 @@
bufs = 0;
lock_buffer(bh);
spin_lock(&journal->j_list_lock);
+ /* Stolen (e.g. for a new transaction) ? */
+ if (jh != commit_transaction->t_sync_datalist) {
+ unlock_buffer(bh);
+ JBUFFER_TRACE(jh, "stolen sync. data");
+ put_bh(bh);
+ continue;
+ }
/* Someone already cleaned up the buffer? */
- if (!buffer_jbd(bh)
- || jh->b_jlist != BJ_SyncData) {
+
+ // Can this happen???
+
+ if (!buffer_jbd(bh)) {
unlock_buffer(bh);
BUFFER_TRACE(bh, "already cleaned up");
put_bh(bh);
continue;
}
put_bh(bh);
+ J_ASSERT_JH(jh, jh->b_transaction ==
+ commit_transaction);
}
if (test_clear_buffer_dirty(bh)) {
BUFFER_TRACE(bh, "needs writeout, submitting");
I am not really sure that the test "!buffer_jbd(bh)" is really useful.
I left it alone for not introducing a new bug.
If you can confirm that it is not necessary, I can take it away.
Thanks,
Zoltan
next prev parent reply other threads:[~2006-06-20 16:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-18 8:25 [PATCH] Change ll_rw_block() calls in JBD Zoltan Menyhart
2006-05-18 13:45 ` Jan Kara
2006-05-18 15:11 ` Zoltan Menyhart
2006-05-18 22:25 ` Stephen C. Tweedie
2006-05-19 10:01 ` Zoltan Menyhart
2006-05-19 12:26 ` Stephen C. Tweedie
2006-05-19 1:30 ` Jan Kara
2006-05-19 12:33 ` Zoltan Menyhart
2006-05-19 15:05 ` Stephen C. Tweedie
2006-05-19 15:06 ` Stephen C. Tweedie
2006-05-24 17:33 ` Jan Kara
2006-05-30 15:36 ` Zoltan Menyhart
2006-05-30 16:40 ` Jan Kara
2006-05-23 16:01 ` Zoltan Menyhart
2006-05-24 9:14 ` Zoltan Menyhart
2006-05-24 17:18 ` Jan Kara
[not found] ` <447F13B3.6050505@bull.net>
[not found] ` <20060601162751.GH26933@atrey.karlin.mff.cuni.cz>
[not found] ` <44801E16.3040300@bull.net>
[not found] ` <20060602134923.GA1644@atrey.karlin.mff.cuni.cz>
2006-06-20 16:33 ` Zoltan Menyhart [this message]
2006-06-21 0:09 ` Jan Kara
-- strict thread matches above, loose matches on Subject: below --
2005-07-11 15:52 Jan Kara
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=44982344.2060507@bull.net \
--to=zoltan.menyhart@bull.net \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=sct@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.