* [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy.
@ 2011-07-17 15:11 Tao Ma
2011-07-17 15:11 ` [PATCH] ext4: Don't increase s_mb_buddies_generated in ext4_mb_release Tao Ma
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Tao Ma @ 2011-07-17 15:11 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso
From: Tao Ma <boyu.mt@taobao.com>
ext4_mb_load_buddy() calls ext4_get_group_info() for setting both
"grp" and "e4b->bd_info", but it could do "e4b->bd_info = grp".
Reported-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
fs/ext4/mballoc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 4e7d055..e7749b7 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1125,7 +1125,7 @@ ext4_mb_load_buddy(struct super_block *sb, ext4_group_t group,
grp = ext4_get_group_info(sb, group);
e4b->bd_blkbits = sb->s_blocksize_bits;
- e4b->bd_info = ext4_get_group_info(sb, group);
+ e4b->bd_info = grp;
e4b->bd_sb = sb;
e4b->bd_group = group;
e4b->bd_buddy_page = NULL;
--
1.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ext4: Don't increase s_mb_buddies_generated in ext4_mb_release.
2011-07-17 15:11 [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy Tao Ma
@ 2011-07-17 15:11 ` Tao Ma
2011-07-23 20:20 ` Ted Ts'o
2011-07-17 15:11 ` [PATCH] ext4: Remove ac_repeats from ext4_allocation_context Tao Ma
2011-07-23 20:19 ` [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy Ted Ts'o
2 siblings, 1 reply; 6+ messages in thread
From: Tao Ma @ 2011-07-17 15:11 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso
From: Tao Ma <boyu.mt@taobao.com>
In ext4_mb_release, we use s_mb_buddies_generated++. Although
the output is OK, but I don't think we need this extra ++.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
fs/ext4/mballoc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index e7749b7..f56a592 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2568,7 +2568,7 @@ int ext4_mb_release(struct super_block *sb)
atomic_read(&sbi->s_mb_lost_chunks));
printk(KERN_INFO
"EXT4-fs: mballoc: %lu generated and it took %Lu\n",
- sbi->s_mb_buddies_generated++,
+ sbi->s_mb_buddies_generated,
sbi->s_mb_generation_time);
printk(KERN_INFO
"EXT4-fs: mballoc: %u preallocated, %u discarded\n",
--
1.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] ext4: Remove ac_repeats from ext4_allocation_context.
2011-07-17 15:11 [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy Tao Ma
2011-07-17 15:11 ` [PATCH] ext4: Don't increase s_mb_buddies_generated in ext4_mb_release Tao Ma
@ 2011-07-17 15:11 ` Tao Ma
2011-07-23 20:20 ` Ted Ts'o
2011-07-23 20:19 ` [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy Ted Ts'o
2 siblings, 1 reply; 6+ messages in thread
From: Tao Ma @ 2011-07-17 15:11 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso
From: Tao Ma <boyu.mt@taobao.com>
ac_repeats isn't referenced in the mballoc code. So remove it.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
fs/ext4/mballoc.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h
index 20b5e7b..9d4a636 100644
--- a/fs/ext4/mballoc.h
+++ b/fs/ext4/mballoc.h
@@ -187,7 +187,6 @@ struct ext4_allocation_context {
__u16 ac_flags; /* allocation hints */
__u8 ac_status;
__u8 ac_criteria;
- __u8 ac_repeats;
__u8 ac_2order; /* if request is to allocate 2^N blocks and
* N > 0, the field stores N, otherwise 0 */
__u8 ac_op; /* operation, for history only */
--
1.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy.
2011-07-17 15:11 [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy Tao Ma
2011-07-17 15:11 ` [PATCH] ext4: Don't increase s_mb_buddies_generated in ext4_mb_release Tao Ma
2011-07-17 15:11 ` [PATCH] ext4: Remove ac_repeats from ext4_allocation_context Tao Ma
@ 2011-07-23 20:19 ` Ted Ts'o
2 siblings, 0 replies; 6+ messages in thread
From: Ted Ts'o @ 2011-07-23 20:19 UTC (permalink / raw)
To: Tao Ma; +Cc: linux-ext4
On Sun, Jul 17, 2011 at 11:11:21PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
>
> ext4_mb_load_buddy() calls ext4_get_group_info() for setting both
> "grp" and "e4b->bd_info", but it could do "e4b->bd_info = grp".
>
> Reported-by: Andreas Dilger <adilger@whamcloud.com>
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Thanks, added to the ext4 tree.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Don't increase s_mb_buddies_generated in ext4_mb_release.
2011-07-17 15:11 ` [PATCH] ext4: Don't increase s_mb_buddies_generated in ext4_mb_release Tao Ma
@ 2011-07-23 20:20 ` Ted Ts'o
0 siblings, 0 replies; 6+ messages in thread
From: Ted Ts'o @ 2011-07-23 20:20 UTC (permalink / raw)
To: Tao Ma; +Cc: linux-ext4
On Sun, Jul 17, 2011 at 11:11:22PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
>
> In ext4_mb_release, we use s_mb_buddies_generated++. Although
> the output is OK, but I don't think we need this extra ++.
>
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Thanks, added to the ext4 tree.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ext4: Remove ac_repeats from ext4_allocation_context.
2011-07-17 15:11 ` [PATCH] ext4: Remove ac_repeats from ext4_allocation_context Tao Ma
@ 2011-07-23 20:20 ` Ted Ts'o
0 siblings, 0 replies; 6+ messages in thread
From: Ted Ts'o @ 2011-07-23 20:20 UTC (permalink / raw)
To: Tao Ma; +Cc: linux-ext4
On Sun, Jul 17, 2011 at 11:11:23PM +0800, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
>
> ac_repeats isn't referenced in the mballoc code. So remove it.
>
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Thanks, added to the ext4 tree.
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-23 20:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-17 15:11 [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy Tao Ma
2011-07-17 15:11 ` [PATCH] ext4: Don't increase s_mb_buddies_generated in ext4_mb_release Tao Ma
2011-07-23 20:20 ` Ted Ts'o
2011-07-17 15:11 ` [PATCH] ext4: Remove ac_repeats from ext4_allocation_context Tao Ma
2011-07-23 20:20 ` Ted Ts'o
2011-07-23 20:19 ` [PATCH] ext4: Remove unnecessary ext4_get_group_info in ext4_mb_load_buddy Ted Ts'o
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).