aboutsummaryrefslogtreecommitdiff
path: root/lib/e2p/ls.c
diff options
context:
space:
mode:
authorAndreas Dilger <adilger@dilger.ca>2013-12-23 16:03:41 -0500
committerTheodore Ts'o <tytso@mit.edu>2013-12-23 16:03:46 -0500
commit11d1116a7c0b833af317249d12025413fecbcd70 (patch)
treeda6ee0c548cce0a1fc07f8ff1f49f98b40d953d0 /lib/e2p/ls.c
parentfd5e00e1d0113fdbf28a546d8dff0366fb3c9a4f (diff)
downloade2fsprogs-11d1116a7c0b833af317249d12025413fecbcd70.tar.gz
e2fsck: verify s_desc_size is power-of-two value
Add a LOG2_CHECK mode for check_super_value() so that it is easy to verify values that are supposed to be power-of-two values (s_desc_size and s_inode_size so far). In ext2fs_check_desc() also check for a power-of-two s_desc_size. Print out s_desc_size in debugfs "stats" and dumpe2fs output, if it is non-zero. It turns out that the s_desc_size validation in check_super_block() is not currently used by e2fsck, because the group descriptors are verified earlier by ext2fs_check_desc(), and even without an explicit check of s_desc_size the group descriptors fail to align correctly on disk. It makes sense to keep the check_super_block() regardless, in case the code changes at some point in the future. Signed-off-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/e2p/ls.c')
-rw-r--r--lib/e2p/ls.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/e2p/ls.c b/lib/e2p/ls.c
index f05e16dc..5b3d3c8b 100644
--- a/lib/e2p/ls.c
+++ b/lib/e2p/ls.c
@@ -259,6 +259,8 @@ void list_super2(struct ext2_super_block * sb, FILE *f)
else
fprintf(f, "Fragment size: %u\n",
EXT2_CLUSTER_SIZE(sb));
+ if (sb->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)
+ fprintf(f, "Group descriptor size: %u\n", sb->s_desc_size);
if (sb->s_reserved_gdt_blocks)
fprintf(f, "Reserved GDT blocks: %u\n",
sb->s_reserved_gdt_blocks);