gdp = ext4fs_group_desc(fs, fs->group_desc, group);
csum = gdp->bg_block_bitmap_csum_lo;
- if (fs->super->s_desc_size >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
csum |= ((__u32)gdp->bg_block_bitmap_csum_hi << 16);
return csum;
}
gdp = ext4fs_group_desc(fs, fs->group_desc, group);
csum = gdp->bg_inode_bitmap_csum_lo;
- if (fs->super->s_desc_size >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
csum |= ((__u32)gdp->bg_inode_bitmap_csum_hi << 16);
return csum;
}
provided = gdp->bg_inode_bitmap_csum_lo;
calculated = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap,
size);
- if (fs->super->s_desc_size >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
provided |= (__u32)gdp->bg_inode_bitmap_csum_hi << 16;
else
calculated &= 0xFFFF;
crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap, size);
gdp->bg_inode_bitmap_csum_lo = crc & 0xFFFF;
- if (fs->super->s_desc_size >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_INODE_BITMAP_CSUM_HI_END)
gdp->bg_inode_bitmap_csum_hi = crc >> 16;
return 0;
provided = gdp->bg_block_bitmap_csum_lo;
calculated = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap,
size);
- if (fs->super->s_desc_size >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
provided |= (__u32)gdp->bg_block_bitmap_csum_hi << 16;
else
calculated &= 0xFFFF;
crc = ext2fs_crc32c_le(fs->csum_seed, (unsigned char *)bitmap, size);
gdp->bg_block_bitmap_csum_lo = crc & 0xFFFF;
- if (fs->super->s_desc_size >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
+ if (EXT2_DESC_SIZE(fs->super) >= EXT4_BG_BLOCK_BITMAP_CSUM_HI_LOCATION)
gdp->bg_block_bitmap_csum_hi = crc >> 16;
return 0;
retval = EXT2_ET_BAD_DESC_SIZE;
goto cleanup;
}
- } else {
- if (fs->super->s_desc_size &&
- fs->super->s_desc_size != EXT2_MIN_DESC_SIZE) {
- retval = EXT2_ET_BAD_DESC_SIZE;
- goto cleanup;
- }
}
fs->cluster_ratio_bits = fs->super->s_log_cluster_size -