/* Return the number of blocks used by the group descriptor table (primary or backup) in this group. In the future there may be a different number of descriptor blocks in each group.  */
unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group)
/* Return the number of blocks used by the group descriptor table (primary or backup) in this group. In the future there may be a different number of descriptor blocks in each group.  */
unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group)
{
	unsigned long first_meta_bg =
			le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg);
	unsigned long metagroup = group / EXT4_DESC_PER_BLOCK(sb);
	if (!EXT4_HAS_INCOMPAT_FEATURE(sb,EXT4_FEATURE_INCOMPAT_META_BG) ||
			metagroup < first_meta_bg)
		return ext4_bg_num_gdb_nometa(sb, group);
	return ext4_bg_num_gdb_meta(sb,group);
}