Skip to contentSkip to conversation

reiserfs transaction overflow

PATCH New Chris Mason 1 participant 1 message Apr 18, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiserfs transaction overflow

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.00001 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

fs/reiserfs/journal.c renamed from fs/reiserfs/journal.c.1 +1 -1
@@ -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 */