diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2012-08-02 20:47:45 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-08-02 20:47:45 -0400 |
commit | 5b58dc2304f06953e1d8314ea570cc3befec95bc (patch) | |
tree | 7a6ce3234d5fb7db763bbdc53d6cdce1218ce664 /misc/dumpe2fs.c | |
parent | 53c2c8afeade037cf16b0631271a850b04c14c78 (diff) | |
download | e2fsprogs-5b58dc2304f06953e1d8314ea570cc3befec95bc.tar.gz |
libext2fs: block group checksum should use metadata_csum algorithm
Change the block group algorithm to use the same algorithm as the rest
of the metadata_csum. This mostly involves providing a helper
function to tell if group descriptors should have checksums set or
verified, and modifying the gdt checksum code to use the correct
algorithm.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'misc/dumpe2fs.c')
-rw-r--r-- | misc/dumpe2fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c index 7b37d0e1..3ba3e9b5 100644 --- a/misc/dumpe2fs.c +++ b/misc/dumpe2fs.c @@ -121,7 +121,7 @@ static void print_bg_opts(ext2_filsys fs, dgrp_t i) { int first = 1, bg_flags = 0; - if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) + if (ext2fs_has_group_desc_csum(fs)) bg_flags = ext2fs_bg_flags(fs, i); print_bg_opt(bg_flags, EXT2_BG_INODE_UNINIT, "INODE_UNINIT", @@ -197,7 +197,7 @@ static void list_desc (ext2_filsys fs) print_range(first_block, last_block); fputs(")", stdout); print_bg_opts(fs, i); - if (fs->super->s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) { + if (ext2fs_has_group_desc_csum(fs)) { unsigned csum = ext2fs_bg_checksum(fs, i); unsigned exp_csum = ext2fs_group_desc_csum(fs, i); |