linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Latest ext3 merge in mainline lacks 2 hunks ?
@ 2002-10-16 20:46 J.A. Magallon
  2002-10-17  9:54 ` Stephen C. Tweedie
  0 siblings, 1 reply; 2+ messages in thread
From: J.A. Magallon @ 2002-10-16 20:46 UTC (permalink / raw)
  To: Lista Linux-Kernel; +Cc: sct, akpm, adilger

Hi all...

I  was patching mainline kernels with the ext3 update until this was
merged recently.
The merge differs from what I had (taken from LKML) in two missing hunks
not present still in -pre11.
Some of the maintainers can say if they are important ?

Here they are:

diff -ruN linux-2.4.20-pre8-jam1/fs/jbd/commit.c linux-2.4.20-pre8-jam1-ext3/fs/jbd/commit.c
--- linux-2.4.20-pre8-jam1/fs/jbd/commit.c	2002-09-28 02:04:49.000000000 +0200
+++ linux-2.4.20-pre8-jam1-ext3/fs/jbd/commit.c	2002-09-28 02:11:55.000000000 +0200
@@ -714,13 +714,25 @@
 			JBUFFER_TRACE(jh, "refile for checkpoint writeback");
 			__journal_refile_buffer(jh);
 		} else {
+			struct page *page = bh->b_page;
+			
 			J_ASSERT_BH(bh, !buffer_dirty(bh));
 			J_ASSERT_JH(jh, jh->b_next_transaction == NULL);
 			__journal_unfile_buffer(jh);
 			jh->b_transaction = 0;
 			__journal_remove_journal_head(bh);
-			__brelse(bh);
+
+			if (TryLockPage(page)) {	
+				__brelse(bh);
+			} else {
+				__brelse(bh);
+				page_cache_get(page);
+				try_to_free_buffers(page, 0);
+				unlock_page(page);
+				page_cache_release(page);
+			}
 		}
+		
 		spin_unlock(&journal_datalist_lock);
 	}
 
diff -ruN linux-2.4.20-pre8-jam1/fs/jbd/transaction.c linux-2.4.20-pre8-jam1-ext3/fs/jbd/transaction.c
--- linux-2.4.20-pre8-jam1/fs/jbd/transaction.c	2002-09-28 02:04:49.000000000 +0200
+++ linux-2.4.20-pre8-jam1-ext3/fs/jbd/transaction.c	2002-09-28 02:11:55.000000000 +0200
@@ -1945,8 +1945,17 @@
 	unlock_journal(journal);
 
 	if (!offset) {
-		if (!may_free || !try_to_free_buffers(page, 0))
+		if (!may_free || !try_to_free_buffers(page, 0)) {
+			if (!offset) {
+				/* We are still using the page, but only
+                                   because a transaction is pinning the
+                                   page.  Once it commits, we want to
+                                   encourage the page to be reaped as
+                                   quickly as possible. */
+				ClearPageReferenced(page);
+			}
 			return 0;
+		}
 		J_ASSERT(page->buffers == NULL);
 	}
 	return 1;


-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.20-pre11-jam0 (gcc 3.2 (Mandrake Linux 9.0 3.2-2mdk))

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

* Re: Latest ext3 merge in mainline lacks 2 hunks ?
  2002-10-16 20:46 Latest ext3 merge in mainline lacks 2 hunks ? J.A. Magallon
@ 2002-10-17  9:54 ` Stephen C. Tweedie
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen C. Tweedie @ 2002-10-17  9:54 UTC (permalink / raw)
  To: J.A. Magallon; +Cc: Lista Linux-Kernel, sct, akpm, adilger

Hi,

On Wed, Oct 16, 2002 at 10:46:48PM +0200, J.A. Magallon wrote:
 
> I  was patching mainline kernels with the ext3 update until this was
> merged recently.
> The merge differs from what I had (taken from LKML) in two missing hunks
> not present still in -pre11.
> Some of the maintainers can say if they are important ?

They are just minor performance-related tweaks that Marcelo wants to
defer merging until 2.4.21-pre opens.

Cheers,
 Stephen

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

end of thread, other threads:[~2002-10-17  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-16 20:46 Latest ext3 merge in mainline lacks 2 hunks ? J.A. Magallon
2002-10-17  9:54 ` Stephen C. Tweedie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).