public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reiserfs mark_journal_new
@ 2001-06-05 16:09 Chris Mason
  0 siblings, 0 replies; only message in thread
From: Chris Mason @ 2001-06-05 16:09 UTC (permalink / raw)
  To: linux-kernel, reiserfs-list; +Cc: alan


Hi guys,

The 2.2.x reiserfs journal code marks newly allocated metadata so that if
it is freed in the same transaction (common due to balancing), it can
immediately be reused as a data block.  It also allows faster freeing for
these blocks.

This tested patch enables that code for 2.4.x, Alan please include.

-chris

diff -ur diff/linux/fs/reiserfs/fix_node.c linux/fs/reiserfs/fix_node.c
--- diff/linux/fs/reiserfs/fix_node.c	Mon Jan 15 18:31:19 2001
+++ linux/fs/reiserfs/fix_node.c	Fri Feb  2 15:40:54 2001
@@ -936,6 +936,7 @@
     if (p_s_tb->FEB[p_s_tb->cur_blknum])
       BUG();
 
+    mark_buffer_journal_new(p_s_new_bh) ;
     p_s_tb->FEB[p_s_tb->cur_blknum++] = p_s_new_bh;
   }
 
diff -Nru a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
--- a/fs/reiserfs/journal.c	Fri Jun  1 13:22:16 2001
+++ b/fs/reiserfs/journal.c	Fri Jun  1 13:22:16 2001
@@ -2550,6 +2550,7 @@
   bh = get_hash_table(p_s_sb->s_dev, blocknr, p_s_sb->s_blocksize) ;
   /* if it is journal new, we just remove it from this transaction */
   if (bh && buffer_journal_new(bh)) {
+    mark_buffer_notjournal_new(bh) ;
     clear_prepared_bits(bh) ;
     cleaned = remove_from_transaction(p_s_sb, blocknr, cleaned) ;
   } else {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-05 16:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-05 16:09 [PATCH] reiserfs mark_journal_new Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox