Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 5th, 2012  |  syntax: Diff  |  size: 1.00 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. From 14dd9f19da089f3ec9ce1d01c3e0ea189f173e80 Mon Sep 17 00:00:00 2001
  2. From: Joshua Holmer <shssoichiro@gmail.com>
  3. Date: Wed, 5 Sep 2012 05:47:26 -0400
  4. Subject: [PATCH] Fix best extents calculation on -c output
  5.  
  6. ---
  7. misc/e4defrag.c |    9 +--------
  8.  1 files changed, 1 insertions(+), 8 deletions(-)
  9.  
  10. diff --git a/misc/e4defrag.c b/misc/e4defrag.c
  11. index 4b31d03..7e3e9f9 100644
  12. --- a/misc/e4defrag.c
  13. +++ b/misc/e4defrag.c
  14. @@ -1060,16 +1060,9 @@ static void free_exts_group(struct fiemap_extent_group *ext_group_head)
  15.  static int get_best_count(ext4_fsblk_t block_count)
  16.  {
  17.         int ret;
  18. -       unsigned int flex_bg_num;
  19.  
  20.         /* Calcuate best extents count */
  21. -       if (feature_incompat & EXT4_FEATURE_INCOMPAT_FLEX_BG) {
  22. -               flex_bg_num = 1 << log_groups_per_flex;
  23. -               ret = ((block_count - 1) /
  24. -                       ((ext4_fsblk_t)blocks_per_group *
  25. -                               flex_bg_num)) + 1;
  26. -       } else
  27. -               ret = ((block_count - 1) / blocks_per_group) + 1;
  28. +       ret = ((block_count - 1) / blocks_per_group) + 1;
  29.  
  30.         return ret;
  31.  }
  32. --
  33. 1.7.0.2.msysgit.0
clone this paste RAW Paste Data