* [Ocfs2-devel] A patch to fix bug 45 in bugzilla
@ 2004-03-18 3:29 Sonic Zhang
2004-03-18 9:11 ` Rusty Lynch
2004-03-18 12:50 ` Mark Fasheh
0 siblings, 2 replies; 4+ messages in thread
From: Sonic Zhang @ 2004-03-18 3:29 UTC (permalink / raw)
To: ocfs2-devel
Hi,
I think I found the root cause of the bug 45 in the bugzilla.
Actually, it is not an OCFS bug. It is caused in the Linux journaling
routine(JBD) journal_create(). In kernel 2.6.x, buffer_head state
BH_Uptodate is checked in mark_buffer_dirty(), while kernel 2.4.x
doesn't do. If this state doesn't exist in the buffer_head, buffer error
information is reported. But, in routine journal_create(), the state
BH_Uptodate is set after the call to mark_buffer_dirty(). This works
well in kernel 2.4.x, but fails in kernel 2.6.x.
I attach a patch to fix this bug in kernel 2.6.x. Could you please put it
into the subfolder "patches" in ocfs2 source tree?
Thank you.
---------------------------------------
--- linux-2.6.1.old/fs/jbd/journal.c 2004-03-18 15:55:47.591428104 +0800
+++ linux-2.6.1/fs/jbd/journal.c 2004-03-18 15:56:25.609648456 +0800
@@ -832,10 +832,10 @@
bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
lock_buffer(bh);
memset (bh->b_data, 0, journal->j_blocksize);
- BUFFER_TRACE(bh, "marking dirty");
- mark_buffer_dirty(bh);
BUFFER_TRACE(bh, "marking uptodate");
set_buffer_uptodate(bh);
+ BUFFER_TRACE(bh, "marking dirty");
+ mark_buffer_dirty(bh);
unlock_buffer(bh);
__brelse(bh);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] A patch to fix bug 45 in bugzilla
2004-03-18 3:29 [Ocfs2-devel] A patch to fix bug 45 in bugzilla Sonic Zhang
@ 2004-03-18 9:11 ` Rusty Lynch
2004-03-18 12:31 ` Mark Fasheh
2004-03-18 12:50 ` Mark Fasheh
1 sibling, 1 reply; 4+ messages in thread
From: Rusty Lynch @ 2004-03-18 9:11 UTC (permalink / raw)
To: ocfs2-devel
On Thu, Mar 18, 2004 at 05:29:20PM +0800, Sonic Zhang wrote:
> Hi,
>
> I think I found the root cause of the bug 45 in the bugzilla.
>
> Actually, it is not an OCFS bug. It is caused in the Linux journaling
> routine(JBD) journal_create(). In kernel 2.6.x, buffer_head state
> BH_Uptodate is checked in mark_buffer_dirty(), while kernel 2.4.x
> doesn't do. If this state doesn't exist in the buffer_head, buffer error
> information is reported. But, in routine journal_create(), the state
> BH_Uptodate is set after the call to mark_buffer_dirty(). This works
> well in kernel 2.4.x, but fails in kernel 2.6.x.
If this is jbd bug, then how come ext3 doesn't trigger buffer_error()?
>
> I attach a patch to fix this bug in kernel 2.6.x. Could you please put it
> into the subfolder "patches" in ocfs2 source tree?
>
> Thank you.
>
> ---------------------------------------
> --- linux-2.6.1.old/fs/jbd/journal.c 2004-03-18 15:55:47.591428104 +0800
> +++ linux-2.6.1/fs/jbd/journal.c 2004-03-18 15:56:25.609648456 +0800
> @@ -832,10 +832,10 @@
> bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
> lock_buffer(bh);
> memset (bh->b_data, 0, journal->j_blocksize);
> - BUFFER_TRACE(bh, "marking dirty");
> - mark_buffer_dirty(bh);
> BUFFER_TRACE(bh, "marking uptodate");
> set_buffer_uptodate(bh);
> + BUFFER_TRACE(bh, "marking dirty");
> + mark_buffer_dirty(bh);
>
> unlock_buffer(bh);
> __brelse(bh);
> }
>
>
>
>
>
>
>
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] A patch to fix bug 45 in bugzilla
2004-03-18 9:11 ` Rusty Lynch
@ 2004-03-18 12:31 ` Mark Fasheh
0 siblings, 0 replies; 4+ messages in thread
From: Mark Fasheh @ 2004-03-18 12:31 UTC (permalink / raw)
To: ocfs2-devel
On Thu, Mar 18, 2004 at 07:10:45AM -0800, Rusty Lynch wrote:
> If this is jbd bug, then how come ext3 doesn't trigger buffer_error()?
Ext3 almost never uses journal_create. They have their mkfs make the
journals for them. (journal_create is used to format a new journal)
--Mark
--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh@oracle.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] A patch to fix bug 45 in bugzilla
2004-03-18 3:29 [Ocfs2-devel] A patch to fix bug 45 in bugzilla Sonic Zhang
2004-03-18 9:11 ` Rusty Lynch
@ 2004-03-18 12:50 ` Mark Fasheh
1 sibling, 0 replies; 4+ messages in thread
From: Mark Fasheh @ 2004-03-18 12:50 UTC (permalink / raw)
To: ocfs2-devel
On Thu, Mar 18, 2004 at 05:29:20PM +0800, Sonic Zhang wrote:
> Hi,
>
> I think I found the root cause of the bug 45 in the bugzilla.
>
> Actually, it is not an OCFS bug. It is caused in the Linux journaling
> routine(JBD) journal_create(). In kernel 2.6.x, buffer_head state
> BH_Uptodate is checked in mark_buffer_dirty(), while kernel 2.4.x
> doesn't do. If this state doesn't exist in the buffer_head, buffer error
> information is reported. But, in routine journal_create(), the state
> BH_Uptodate is set after the call to mark_buffer_dirty(). This works
> well in kernel 2.4.x, but fails in kernel 2.6.x.
>
> I attach a patch to fix this bug in kernel 2.6.x. Could you please put it
> into the subfolder "patches" in ocfs2 source tree?
Cool! For some reason, this doesn't seem to patch against my 2.6.4 tree.
Would you mind regenerating it against a more recent 2.6 kernel? Also, you
should forward it to Stephen Tweedie (sct@redhat.com), the JBD maintainer.
--Mark
--
Mark Fasheh
Software Developer, Oracle Corp
mark.fasheh@oracle.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-18 12:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-18 3:29 [Ocfs2-devel] A patch to fix bug 45 in bugzilla Sonic Zhang
2004-03-18 9:11 ` Rusty Lynch
2004-03-18 12:31 ` Mark Fasheh
2004-03-18 12:50 ` Mark Fasheh
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.