From ff5e71f1a181cf650a47cf229475796278ae5448 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 26 Oct 2005 00:30:10 +0000 Subject: [PATCH] Branch b1_4 Use "if (likely(!ext3_mb_agressive))" since it is likely that this is not set (it defaults to off). Also, check this first since it is the likely case. --- ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch | 6 +++--- .../kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch | 12 ++++++------ lustre/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch | 6 +++--- .../kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch index 5e5268f..31e7e38 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch @@ -568,10 +568,10 @@ Index: linux-2.6.5-7.201/fs/ext3/mballoc.c + int max, max2, i, j, k, count; + void *buddy, *buddy2; + -+ if (!test_opt(e3b->bd_sb, MBALLOC)) ++ if (likely(!ext3_mb_aggressive)) + return; + -+ if (unlikely(!ext3_mb_aggressive)) ++ if (!test_opt(e3b->bd_sb, MBALLOC)) + return; + + while (order > 1) { @@ -2134,7 +2134,7 @@ Index: linux-2.6.5-7.201/fs/ext3/mballoc.c +extern void ext3_free_blocks_old(handle_t *handle, struct inode *inode, + unsigned long block, unsigned long count); +void ext3_free_blocks(handle_t *handle, struct inode *inode, -+ unsigned long block, unsigned long count, int metadata) ++ unsigned long block, unsigned long count, int metadata) +{ + int freed; + diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch index c0e2e16..b3d9f73 100644 --- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch +++ b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch @@ -585,10 +585,10 @@ Index: linux-2.6.9/fs/ext3/mballoc.c + int max, max2, i, j, k, count; + void *buddy, *buddy2; + -+ if (!test_opt(e3b->bd_sb, MBALLOC)) ++ if (likely(!ext3_mb_aggressive)) + return; + -+ if (unlikely(!ext3_mb_aggressive)) ++ if (!test_opt(e3b->bd_sb, MBALLOC)) + return; + + while (order > 1) { @@ -1374,7 +1374,7 @@ Index: linux-2.6.9/fs/ext3/mballoc.c + * path only, here is single block always */ + ext3_mb_release_blocks(sb, 1); + } -+ ++ + if ((ext3_mb_stats) && (ac.ac_g_ex.fe_len > 1)) { + spin_lock(&sbi->s_bal_lock); + sbi->s_bal_reqs++; @@ -2162,10 +2162,10 @@ Index: linux-2.6.9/fs/ext3/mballoc.c + DQUOT_FREE_BLOCK(inode, freed); + return; +} -Index: linux-2.6.9/fs/ext3/proc.c +Index: linux-2.6.5-7.201/fs/ext3/proc.c =================================================================== ---- linux-2.6.9.orig/fs/ext3/proc.c 2005-10-13 19:40:57.851699336 +0400 -+++ linux-2.6.9/fs/ext3/proc.c 2005-10-14 09:10:31.000000000 +0400 +--- linux-2.6.5-7.201.orig/fs/ext3/proc.c 2005-10-13 19:40:57.851699336 +0400 ++++ linux-2.6.5-7.201/fs/ext3/proc.c 2005-10-14 09:02:36.000000000 +0400 @@ -0,0 +1,195 @@ +#include +#include diff --git a/lustre/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch b/lustre/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch index 5e5268f..31e7e38 100644 --- a/lustre/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch +++ b/lustre/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch @@ -568,10 +568,10 @@ Index: linux-2.6.5-7.201/fs/ext3/mballoc.c + int max, max2, i, j, k, count; + void *buddy, *buddy2; + -+ if (!test_opt(e3b->bd_sb, MBALLOC)) ++ if (likely(!ext3_mb_aggressive)) + return; + -+ if (unlikely(!ext3_mb_aggressive)) ++ if (!test_opt(e3b->bd_sb, MBALLOC)) + return; + + while (order > 1) { @@ -2134,7 +2134,7 @@ Index: linux-2.6.5-7.201/fs/ext3/mballoc.c +extern void ext3_free_blocks_old(handle_t *handle, struct inode *inode, + unsigned long block, unsigned long count); +void ext3_free_blocks(handle_t *handle, struct inode *inode, -+ unsigned long block, unsigned long count, int metadata) ++ unsigned long block, unsigned long count, int metadata) +{ + int freed; + diff --git a/lustre/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch b/lustre/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch index c0e2e16..b3d9f73 100644 --- a/lustre/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch +++ b/lustre/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch @@ -585,10 +585,10 @@ Index: linux-2.6.9/fs/ext3/mballoc.c + int max, max2, i, j, k, count; + void *buddy, *buddy2; + -+ if (!test_opt(e3b->bd_sb, MBALLOC)) ++ if (likely(!ext3_mb_aggressive)) + return; + -+ if (unlikely(!ext3_mb_aggressive)) ++ if (!test_opt(e3b->bd_sb, MBALLOC)) + return; + + while (order > 1) { @@ -1374,7 +1374,7 @@ Index: linux-2.6.9/fs/ext3/mballoc.c + * path only, here is single block always */ + ext3_mb_release_blocks(sb, 1); + } -+ ++ + if ((ext3_mb_stats) && (ac.ac_g_ex.fe_len > 1)) { + spin_lock(&sbi->s_bal_lock); + sbi->s_bal_reqs++; @@ -2162,10 +2162,10 @@ Index: linux-2.6.9/fs/ext3/mballoc.c + DQUOT_FREE_BLOCK(inode, freed); + return; +} -Index: linux-2.6.9/fs/ext3/proc.c +Index: linux-2.6.5-7.201/fs/ext3/proc.c =================================================================== ---- linux-2.6.9.orig/fs/ext3/proc.c 2005-10-13 19:40:57.851699336 +0400 -+++ linux-2.6.9/fs/ext3/proc.c 2005-10-14 09:10:31.000000000 +0400 +--- linux-2.6.5-7.201.orig/fs/ext3/proc.c 2005-10-13 19:40:57.851699336 +0400 ++++ linux-2.6.5-7.201/fs/ext3/proc.c 2005-10-14 09:02:36.000000000 +0400 @@ -0,0 +1,195 @@ +#include +#include -- 1.8.3.1