[PATCH] reiserfs transaction overflow

2001-04-18 Thread Chris Mason


Hi guys,

Under certain loads, the reiserfs journal can overflow the
max transaction size, leading to a crash (but not corruption).

When the transaction is too full for another writer to join,
the writer triggers a commit, and waits for the next transaction.
But, it doesn't properly check to make sure the next transcation
has enough room, which can lead to overflow.  It is hard to
hit because there is a large margin of error in the way log space
is reserved (this bug was probably in v.1 of the journal
code).

A similar patch will be needed for 3.5.x reiserfs, that will
follow soon.

Anyway, this patch should fix 2.4.x, please apply:

-chris

--- linux/fs/reiserfs/journal.c.1   Tue Apr 17 09:36:36 2001
+++ linux/fs/reiserfs/journal.c Tue Apr 17 09:37:50 2001
@@ -2052,7 +2052,7 @@
sleep_on(&(SB_JOURNAL(p_s_sb)->j_join_wait)) ;
   }
 }
-lock_journal(p_s_sb) ; /* relock to continue */
+goto relock ;
   }
 
   if (SB_JOURNAL(p_s_sb)->j_trans_start_time == 0) { /* we are the first writer, set 
trans_id */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



[PATCH] reiserfs transaction overflow

2001-04-18 Thread Chris Mason


Hi guys,

Under certain loads, the reiserfs journal can overflow the
max transaction size, leading to a crash (but not corruption).

When the transaction is too full for another writer to join,
the writer triggers a commit, and waits for the next transaction.
But, it doesn't properly check to make sure the next transcation
has enough room, which can lead to overflow.  It is hard to
hit because there is a large margin of error in the way log space
is reserved (this bug was probably in v.1 of the journal
code).

A similar patch will be needed for 3.5.x reiserfs, that will
follow soon.

Anyway, this patch should fix 2.4.x, please apply:

-chris

--- linux/fs/reiserfs/journal.c.1   Tue Apr 17 09:36:36 2001
+++ linux/fs/reiserfs/journal.c Tue Apr 17 09:37:50 2001
@@ -2052,7 +2052,7 @@
sleep_on((SB_JOURNAL(p_s_sb)-j_join_wait)) ;
   }
 }
-lock_journal(p_s_sb) ; /* relock to continue */
+goto relock ;
   }
 
   if (SB_JOURNAL(p_s_sb)-j_trans_start_time == 0) { /* we are the first writer, set 
trans_id */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/