From 14dd9f19da089f3ec9ce1d01c3e0ea189f173e80 Mon Sep 17 00:00:00 2001
From: Joshua Holmer <shssoichiro@gmail.com>
Date: Wed, 5 Sep 2012 05:47:26 -0400
Subject: [PATCH] Fix best extents calculation on -c output
---
misc/e4defrag.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/misc/e4defrag.c b/misc/e4defrag.c
index 4b31d03..7e3e9f9 100644
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -1060,16 +1060,9 @@ static void free_exts_group(struct fiemap_extent_group *ext_group_head)
static int get_best_count(ext4_fsblk_t block_count)
{
int ret;
- unsigned int flex_bg_num;
/* Calcuate best extents count */
- if (feature_incompat & EXT4_FEATURE_INCOMPAT_FLEX_BG) {
- flex_bg_num = 1 << log_groups_per_flex;
- ret = ((block_count - 1) /
- ((ext4_fsblk_t)blocks_per_group *
- flex_bg_num)) + 1;
- } else
- ret = ((block_count - 1) / blocks_per_group) + 1;
+ ret = ((block_count - 1) / blocks_per_group) + 1;
return ret;
}
--
1.7.0.2.msysgit.0