diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-06-04 10:20:47 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-06-04 17:43:10 -0400 |
commit | 1da5ef707904cf99300a0fb36b9ae3b29dbc8bde (patch) | |
tree | 4df7edba6286ccfc9f78aabc4ea506179913d9ad /misc | |
parent | ae9e37cd114385764864518057ff854b3f335440 (diff) | |
download | e2fsprogs-1da5ef707904cf99300a0fb36b9ae3b29dbc8bde.tar.gz |
libext2fs: change fs->clustersize to fs->cluster_ratio_bits
The log2 of the ratio of cluster size to block size is far more useful
than just storing the cluster size. So make this change, and then
define basic utility macros: EXT2FS_CLUSTER_RATIO(),
EXT2FS_CLUSTER_MASK(), EXT2FS_B2C(), EXT2FS_C2B(), and
EXT2FS_NUM_B2C().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/mke2fs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 9f28901a..c46df6ce 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -619,9 +619,10 @@ static void show_stats(ext2_filsys fs) if (EXT2_HAS_RO_COMPAT_FEATURE(fs->super, EXT4_FEATURE_RO_COMPAT_BIGALLOC)) printf(_("Cluster size=%u (log=%u)\n"), - fs->clustersize, s->s_log_cluster_size); + fs->blocksize << fs->cluster_ratio_bits, + s->s_log_cluster_size); else - printf(_("Fragment size=%u (log=%u)\n"), fs->clustersize, + printf(_("Fragment size=%u (log=%u)\n"), EXT2_CLUSTER_SIZE(s), s->s_log_cluster_size); printf(_("Stride=%u blocks, Stripe width=%u blocks\n"), s->s_raid_stride, s->s_raid_stripe_width); |