All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sonic Zhang <sonic.zhang@intel.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] A patch to fix bug 45 in bugzilla
Date: Thu Mar 18 03:29:03 2004	[thread overview]
Message-ID: <40596BF0.8020807@intel.com> (raw)

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);
 	}

             reply	other threads:[~2004-03-18  3:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18  3:29 Sonic Zhang [this message]
2004-03-18  9:11 ` [Ocfs2-devel] A patch to fix bug 45 in bugzilla Rusty Lynch
2004-03-18 12:31   ` Mark Fasheh
2004-03-18 12:50 ` Mark Fasheh

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=40596BF0.8020807@intel.com \
    --to=sonic.zhang@intel.com \
    --cc=ocfs2-devel@oss.oracle.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.