All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: Fix for ext4_mb_collect_stats()
@ 2010-05-03 17:26 Curt Wohlgemuth
  2010-05-21  3:15 ` tytso
  0 siblings, 1 reply; 2+ messages in thread
From: Curt Wohlgemuth @ 2010-05-03 17:26 UTC (permalink / raw)
  To: ext4 development

Fix ext4_mb_collect_stats() to use the correct test for s_bal_success; it
should be testing "best-extent.fe_len >= orig-extent.fe_len" , not
"orig-extent.fe_len >= goal-extent.fe_len" .

	Signed-off-by: Curt Wohlgemuth <curtw@google.org>
---
diff -uprN orig/fs/ext4/mballoc.c new/fs/ext4/mballoc.c
--- orig/fs/ext4/mballoc.c	2010-05-03 10:11:36.000000000 -0700
+++ new/fs/ext4/mballoc.c	2010-05-03 10:13:31.000000000 -0700
@@ -2981,7 +2981,7 @@ static void ext4_mb_collect_stats(struct
 	if (sbi->s_mb_stats && ac->ac_g_ex.fe_len > 1) {
 		atomic_inc(&sbi->s_bal_reqs);
 		atomic_add(ac->ac_b_ex.fe_len, &sbi->s_bal_allocated);
-		if (ac->ac_o_ex.fe_len >= ac->ac_g_ex.fe_len)
+		if (ac->ac_b_ex.fe_len >= ac->ac_o_ex.fe_len)
 			atomic_inc(&sbi->s_bal_success);
 		atomic_add(ac->ac_found, &sbi->s_bal_ex_scanned);
 		if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&

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

* Re: [PATCH] ext4: Fix for ext4_mb_collect_stats()
  2010-05-03 17:26 [PATCH] ext4: Fix for ext4_mb_collect_stats() Curt Wohlgemuth
@ 2010-05-21  3:15 ` tytso
  0 siblings, 0 replies; 2+ messages in thread
From: tytso @ 2010-05-21  3:15 UTC (permalink / raw)
  To: Curt Wohlgemuth; +Cc: ext4 development

On Mon, May 03, 2010 at 10:26:43AM -0700, Curt Wohlgemuth wrote:
> Fix ext4_mb_collect_stats() to use the correct test for s_bal_success; it
> should be testing "best-extent.fe_len >= orig-extent.fe_len" , not
> "orig-extent.fe_len >= goal-extent.fe_len" .
> 
> Signed-off-by: Curt Wohlgemuth <curtw@google.org>

Added to the ext4 patch queue.

					- Ted

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

end of thread, other threads:[~2010-05-21  3:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 17:26 [PATCH] ext4: Fix for ext4_mb_collect_stats() Curt Wohlgemuth
2010-05-21  3:15 ` tytso

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.