summaryrefslogtreecommitdiff
path: root/misc/e2freefrag.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/e2freefrag.c')
-rw-r--r--misc/e2freefrag.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/misc/e2freefrag.c b/misc/e2freefrag.c
index 30af43e2..612ca445 100644
--- a/misc/e2freefrag.c
+++ b/misc/e2freefrag.c
@@ -172,10 +172,10 @@ static errcode_t get_chunk_info(ext2_filsys fs, struct chunk_info *info,
/* Display chunk information in KB */
if (info->real_free_chunks) {
- info->min = (info->min * fs->blocksize) >> 10;
- info->max = (info->max * fs->blocksize) >> 10;
- info->avg = (info->avg / info->real_free_chunks *
- fs->blocksize) >> 10;
+ unsigned int scale = fs->blocksize >> 10;
+ info->min = info->min * scale;
+ info->max = info->max * scale;
+ info->avg = info->avg / info->real_free_chunks * scale;
} else {
info->min = 0;
}
@@ -249,13 +249,14 @@ static void collect_info(ext2_filsys fs, struct chunk_info *chunk_info, FILE *f)
static void open_device(char *device_name, ext2_filsys *fs)
{
int retval;
- int flag = EXT2_FLAG_FORCE;
+ int flag = EXT2_FLAG_FORCE | EXT2_FLAG_64BITS;
retval = ext2fs_open(device_name, flag, 0, 0, unix_io_manager, fs);
if (retval) {
com_err(device_name, retval, "while opening filesystem");
exit(1);
}
+ (*fs)->default_bitmap_type = EXT2FS_BMAP64_RBTREE;
}
#endif