All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make reiserfs BUG on too big transaction
@ 2005-05-19  9:36 Jan Kara
  2005-05-20  0:11 ` Chris Mason
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2005-05-19  9:36 UTC (permalink / raw)
  To: reiserfs-list; +Cc: mason, akpm

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

  Hello!

  Attached patch makes reiserfs BUG() when somebody tries to start a
larger transaction than it's allowed (currently the code just silently
deadlocks). I think this is a better behaviour. Can you please apply the
patch?

								Honza

[-- Attachment #2: reiser-2.6.12-rc4-1-bigtrans.diff --]
[-- Type: text/plain, Size: 641 bytes --]

Make kernel BUG when someone tries to start a transaction which is too
large.

Signed-off-by: Jan Kara <jack@suse.cz>

diff -rup linux-2.6.12-rc4/fs/reiserfs/journal.c linux-2.6.12-rc4-reiserassert/fs/reiserfs/journal.c
--- linux-2.6.12-rc4/fs/reiserfs/journal.c	Sat May 14 13:02:01 2005
+++ linux-2.6.12-rc4-reiserassert/fs/reiserfs/journal.c	Sat May 14 13:21:43 2005
@@ -2631,6 +2631,8 @@ static int do_journal_begin_r(struct rei
   int retval;
 
   reiserfs_check_lock_depth(p_s_sb, "journal_begin") ;
+  if (nblocks > journal->j_trans_max)
+	BUG();
 
   PROC_INFO_INC( p_s_sb, journal.journal_being );
   /* set here for journal_join */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Make reiserfs BUG on too big transaction
  2005-05-19  9:36 [PATCH] Make reiserfs BUG on too big transaction Jan Kara
@ 2005-05-20  0:11 ` Chris Mason
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Mason @ 2005-05-20  0:11 UTC (permalink / raw)
  To: Jan Kara; +Cc: reiserfs-list, akpm

On Thursday 19 May 2005 05:36, Jan Kara wrote:
>   Hello!
>
>   Attached patch makes reiserfs BUG() when somebody tries to start a
> larger transaction than it's allowed (currently the code just silently
> deadlocks). I think this is a better behaviour. Can you please apply the
> patch?

Ack, looks ok.  In theory, we could return an error instead and force the FS 
into readonly mode, but it's better to catch the offending caller.

-chris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-20  0:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  9:36 [PATCH] Make reiserfs BUG on too big transaction Jan Kara
2005-05-20  0:11 ` Chris Mason

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.