static char *fn_numbuf;
int zero_hugefile = 1;
-#define SYSFS_PATH_LEN 256
+#define SYSFS_PATH_LEN 300
typedef char sysfs_path_t[SYSFS_PATH_LEN];
#ifndef HAVE_SNPRINTF
e_blocks2 = (e_blocks + extents_per_block - 1) / extents_per_block;
e_blocks3 = (e_blocks2 + extents_per_block - 1) / extents_per_block;
e_blocks4 = (e_blocks3 + extents_per_block - 1) / extents_per_block;
- return e_blocks + e_blocks2 + e_blocks3 + e_blocks4;
+ return (e_blocks + e_blocks2 + e_blocks3 + e_blocks4) *
+ EXT2FS_CLUSTER_RATIO(fs);
}
/*
num_blocks = fs_blocks / num_files;
}
- num_slack += calc_overhead(fs, num_blocks) * num_files;
+ num_slack += (calc_overhead(fs, num_blocks ? num_blocks : fs_blocks) *
+ num_files);
num_slack += (num_files / 16) + 1; /* space for dir entries */
goal = get_start_block(fs, num_slack);
goal = round_up_align(goal, align, part_offset);