linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Ted Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH 2/6] jbd2: Fix BH_JWrite setting in checkpointing code
Date: Wed, 11 Jan 2012 01:31:08 +0100	[thread overview]
Message-ID: <1326241872-20142-3-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1326241872-20142-1-git-send-email-jack@suse.cz>

BH_JWrite bit should be set when buffer is written to the journal. So
checkpointing shouldn't set this bit when writing out buffer. This didn't
cause any observable bug since BH_JWrite bit is used only for debugging
purposes but it's good to have this consistent.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/jbd2/checkpoint.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c
index a5285d6..3816695 100644
--- a/fs/jbd2/checkpoint.c
+++ b/fs/jbd2/checkpoint.c
@@ -266,7 +266,6 @@ __flush_batch(journal_t *journal, int *batch_count)
 
 	for (i = 0; i < *batch_count; i++) {
 		struct buffer_head *bh = journal->j_chkpt_bhs[i];
-		clear_buffer_jwrite(bh);
 		BUFFER_TRACE(bh, "brelse");
 		__brelse(bh);
 	}
@@ -340,7 +339,6 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
 		BUFFER_TRACE(bh, "queue");
 		get_bh(bh);
 		J_ASSERT_BH(bh, !buffer_jwrite(bh));
-		set_buffer_jwrite(bh);
 		journal->j_chkpt_bhs[*batch_count] = bh;
 		__buffer_relink_io(jh);
 		jbd_unlock_bh_state(bh);
-- 
1.7.1


  parent reply	other threads:[~2012-01-11  0:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11  0:31 [PATCH 0/6] jbd2: Checkpointing fix and cleanups Jan Kara
2012-01-11  0:31 ` [PATCH 1/6] jbd2: Issue cache flush after checkpointing even with internal journal Jan Kara
2012-01-11 12:49   ` Jan Kara
2012-02-09  3:05     ` Ted Ts'o
2012-02-09  5:26       ` Theodore Tso
2012-02-10 13:58         ` Jan Kara
2012-02-10 13:55       ` Jan Kara
2012-01-11  0:31 ` Jan Kara [this message]
2012-01-11  0:31 ` [PATCH 3/6] jbd2: __jbd2_journal_temp_unlink_buffer() is static Jan Kara
2012-01-11  0:31 ` [PATCH 4/6] jbd2: Remove always true condition in __journal_try_to_free_buffer() Jan Kara
2012-01-11  0:31 ` [PATCH 5/6] jbd2: Remove bh_state lock from checkpointing code Jan Kara
2012-01-11  0:31 ` [PATCH 6/6] jbd2: Cleanup journal tail after transaction commit 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=1326241872-20142-3-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).