metadata_csum implies uninit_bg, and in fact forces the bit off for
rocompat with older implementations. Therefore, to detect the
presence of checksums, we should use the predicate function to decide
if group descriptor checksums are turned on, not open-coded flag
tests.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
ext2fs_inode_table_loc(fs, i)) {
unsigned int end = (unsigned) fs->inode_blocks_per_group;
/* skip unused blocks */
- if (!output_is_blk &&
- EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
- EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
+ if (!output_is_blk && ext2fs_has_group_desc_csum(fs))
end -= (ext2fs_bg_itable_unused(fs, i) /
EXT2_INODES_PER_BLOCK(fs->super));
for (j = 0, b = ext2fs_inode_table_loc(fs, i);
* supports lazy inode initialization, we can skip
* initializing the inode table.
*/
- if (lazy_itable_init &&
- EXT2_HAS_RO_COMPAT_FEATURE(fs->super,
- EXT4_FEATURE_RO_COMPAT_GDT_CSUM)) {
+ if (lazy_itable_init && ext2fs_has_group_desc_csum(fs)) {
retval = 0;
goto errout;
}