Lines Matching defs:mdt
969 nandfs_calc_mdt_consts(int blocksize, struct nandfs_mdt *mdt, int entry_size)
972 mdt->entries_per_group = blocksize * 8; /* bits in sector */
973 mdt->entries_per_block = blocksize / entry_size;
974 mdt->blocks_per_group =
975 (mdt->entries_per_group -1) / mdt->entries_per_block + 1 + 1;
976 mdt->groups_per_desc_block =
978 mdt->blocks_per_desc_block =
979 mdt->groups_per_desc_block * mdt->blocks_per_group + 1;
983 nandfs_mdt_trans(struct nandfs_mdt *mdt, uint64_t index,
991 group = index / mdt->entries_per_group;
992 group_offset = index % mdt->entries_per_group;
993 desc_block = group / mdt->groups_per_desc_block;
994 desc_offset = group % mdt->groups_per_desc_block;
995 blocknr_in_group = group_offset / mdt->entries_per_block;
998 blknr = 1 + desc_block * mdt->blocks_per_desc_block;
1001 blknr += desc_offset * mdt->blocks_per_group;
1007 *entry_in_block = group_offset % mdt->entries_per_block;