- jbd-fix-bug-in-journal_commit_transaction-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     jbd: fix for reallocated deleted buffers

has been removed from the -mm tree.  Its filename is

     jbd-fix-bug-in-journal_commit_transaction-fix.patch

This patch was dropped because it was folded into jbd-fix-bug-in-journal_commit_transaction.patch

------------------------------------------------------
Subject: jbd: fix for reallocated deleted buffers
From: Jan Kara <jack@xxxxxxx>


My original patch (jbd-fix-bug-in-journal_commit_transaction.patch in -mm)
fixing assertion failure in journal_commit_transaction() on

J_ASSERT_JH(jh, jh->b_next_transaction == NULL);

had one flaw in it.  The fix was to refile buffers that had
b_next_transaction set as that was perfectly correct situation.  But
__journal_refile_buffer() places all the buffers on BJ_Metadata list.  As
we can refile also buffers that are not jbddirty() it sometimes happened
that the buffer was never marked jbddirty() and an assertion in
journal_write_metadata_buffer() failed when committing the next
transaction.

Attached patch makes journal_refile_buffer() file buffer into BJ_Reserved
list when it is not jbddirty().  IBM and one other guy seeing the problem
are now testing the patch and it seems to do its job.  Please put it into
-mm tree for some more widespread testing.  Thanks.



Non-jbddirty buffers should be filed to BJ_Reserved and not BJ_Metadata
list.  It can actually happen that we refile such buffers during the commit
phase when we reallocate in the running transaction blocks deleted in
committing transaction (and that can happen if the committing transaction
already wrote all the data and is just cleaning up BJ_Forget list).

Signed-off-by: Jan Kara <jack@xxxxxxx>
Cc: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/jbd/transaction.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/jbd/transaction.c~jbd-fix-bug-in-journal_commit_transaction-fix fs/jbd/transaction.c
--- 25/fs/jbd/transaction.c~jbd-fix-bug-in-journal_commit_transaction-fix	Fri Jun  2 14:14:05 2006
+++ 25-akpm/fs/jbd/transaction.c	Fri Jun  2 14:14:05 2006
@@ -2038,7 +2038,8 @@ void __journal_refile_buffer(struct jour
 	__journal_temp_unlink_buffer(jh);
 	jh->b_transaction = jh->b_next_transaction;
 	jh->b_next_transaction = NULL;
-	__journal_file_buffer(jh, jh->b_transaction, BJ_Metadata);
+	__journal_file_buffer(jh, jh->b_transaction,
+				was_dirty ? BJ_Metadata : BJ_Reserved);
 	J_ASSERT_JH(jh, jh->b_transaction->t_state == T_RUNNING);
 
 	if (was_dirty)
_

Patches currently in -mm which might be from jack@xxxxxxx are

jbd-fix-bug-in-journal_commit_transaction.patch
jbd-fix-bug-in-journal_commit_transaction-fix.patch
jbd-split-checkpoint-lists.patch
use-list_add_tail-instead-of-list_add.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux