summaryrefslogtreecommitdiff
path: root/lib/e2p
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-02-25 21:43:54 -0500
committerTheodore Ts'o <tytso@mit.edu>2011-02-25 21:43:54 -0500
commit412376efff3c0e0c2fea00666c2457e6f2ae1878 (patch)
tree94f5cd4406a887a355edb3311183b59272549250 /lib/e2p
parent0edcc2702106ef8ea0d4ab60ef06c0c38b0b87ee (diff)
downloade2fsprogs-412376efff3c0e0c2fea00666c2457e6f2ae1878.tar.gz
Add basic BIGALLOC support for cluster-based allocation
This adds the superblock fields needed so that dumpe2fs works and the code points and renames the superblock fields from describing fragments to clusters. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/e2p')
-rw-r--r--lib/e2p/feature.c2
-rw-r--r--lib/e2p/ls.c14
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/e2p/feature.c b/lib/e2p/feature.c
index 9324199b..16fba53a 100644
--- a/lib/e2p/feature.c
+++ b/lib/e2p/feature.c
@@ -57,6 +57,8 @@ static struct feature feature_list[] = {
"extra_isize" },
{ E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_QUOTA,
"quota" },
+ { E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_BIGALLOC,
+ "bigalloc"},
{ E2P_FEATURE_INCOMPAT, EXT2_FEATURE_INCOMPAT_COMPRESSION,
"compression" },
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c
index 8b8360a8..04a2c715 100644
--- a/lib/e2p/ls.c
+++ b/lib/e2p/ls.c
@@ -229,12 +229,22 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
fprintf(f, "Free inodes: %u\n", sb->s_free_inodes_count);
fprintf(f, "First block: %u\n", sb->s_first_data_block);
fprintf(f, "Block size: %u\n", EXT2_BLOCK_SIZE(sb));
- fprintf(f, "Fragment size: %u\n", EXT2_FRAG_SIZE(sb));
+ if (sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC)
+ fprintf(f, "Cluster size: %u\n",
+ EXT2_CLUSTER_SIZE(sb));
+ else
+ fprintf(f, "Fragment size: %u\n",
+ EXT2_CLUSTER_SIZE(sb));
if (sb->s_reserved_gdt_blocks)
fprintf(f, "Reserved GDT blocks: %u\n",
sb->s_reserved_gdt_blocks);
fprintf(f, "Blocks per group: %u\n", sb->s_blocks_per_group);
- fprintf(f, "Fragments per group: %u\n", sb->s_frags_per_group);
+ if (sb->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC)
+ fprintf(f, "Clusters per group: %u\n",
+ sb->s_clusters_per_group);
+ else
+ fprintf(f, "Fragments per group: %u\n",
+ sb->s_clusters_per_group);
fprintf(f, "Inodes per group: %u\n", sb->s_inodes_per_group);
fprintf(f, "Inode blocks per group: %u\n", inode_blocks_per_group);
if (sb->s_raid_stride)