Lines Matching refs:le16_to_cpu

148 	return (u32)le16_to_cpu(cl->cl_cpg) * (u32)le16_to_cpu(cl->cl_bpc);  in ocfs2_bits_per_group()
183 if (le16_to_cpu(gd->bg_free_bits_count) > le16_to_cpu(gd->bg_bits)) { in ocfs2_validate_gd_self()
186 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
187 le16_to_cpu(gd->bg_free_bits_count)); in ocfs2_validate_gd_self()
190 if (le16_to_cpu(gd->bg_bits) > (8 * le16_to_cpu(gd->bg_size))) { in ocfs2_validate_gd_self()
193 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
194 8 * le16_to_cpu(gd->bg_size)); in ocfs2_validate_gd_self()
215 max_bits = le16_to_cpu(di->id2.i_chain.cl_cpg) * le16_to_cpu(di->id2.i_chain.cl_bpc); in ocfs2_validate_gd_parent()
216 if (le16_to_cpu(gd->bg_bits) > max_bits) { in ocfs2_validate_gd_parent()
219 le16_to_cpu(gd->bg_bits)); in ocfs2_validate_gd_parent()
223 if ((le16_to_cpu(gd->bg_chain) > in ocfs2_validate_gd_parent()
224 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) || in ocfs2_validate_gd_parent()
225 ((le16_to_cpu(gd->bg_chain) == in ocfs2_validate_gd_parent()
226 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) && !resize)) { in ocfs2_validate_gd_parent()
229 le16_to_cpu(gd->bg_chain)); in ocfs2_validate_gd_parent()
331 rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec)]; in ocfs2_bg_discontig_add_extent()
333 rec->e_cpos = cpu_to_le32(le16_to_cpu(bg->bg_bits) / in ocfs2_bg_discontig_add_extent()
334 le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
336 le16_add_cpu(&bg->bg_bits, clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
338 clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
381 if (group_clusters == le16_to_cpu(cl->cl_cpg)) in ocfs2_block_group_fill()
389 bg->bg_free_bits_count = cpu_to_le16(le16_to_cpu(bg->bg_bits) - 1); in ocfs2_block_group_fill()
409 while (curr < le16_to_cpu(cl->cl_count)) { in ocfs2_find_smallest_chain()
431 le16_to_cpu(cl->cl_cpg), &bit_off, in ocfs2_block_group_alloc_contig()
494 unsigned int needed = le16_to_cpu(cl->cl_cpg) - in ocfs2_block_group_grow_discontig()
495 le16_to_cpu(bg->bg_bits) / le16_to_cpu(cl->cl_bpc); in ocfs2_block_group_grow_discontig()
509 while ((needed > 0) && (le16_to_cpu(el->l_next_free_rec) < in ocfs2_block_group_grow_discontig()
510 le16_to_cpu(el->l_count))) { in ocfs2_block_group_grow_discontig()
526 needed = le16_to_cpu(cl->cl_cpg) - in ocfs2_block_group_grow_discontig()
527 le16_to_cpu(bg->bg_bits) / le16_to_cpu(cl->cl_bpc); in ocfs2_block_group_grow_discontig()
560 for (i = 0; i < le16_to_cpu(el->l_next_free_rec); i++) { in ocfs2_bg_alloc_cleanup()
565 le16_to_cpu(rec->e_leaf_clusters)); in ocfs2_bg_alloc_cleanup()
584 unsigned int min_bits = le16_to_cpu(cl->cl_cpg) >> 1; in ocfs2_block_group_alloc_discontig()
673 le16_to_cpu(cl->cl_cpg), in ocfs2_block_group_alloc()
682 le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
719 alloc_rec = le16_to_cpu(bg->bg_chain); in ocfs2_block_group_alloc()
721 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
723 le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
725 if (le16_to_cpu(cl->cl_next_free_rec) < le16_to_cpu(cl->cl_count)) in ocfs2_block_group_alloc()
728 le32_add_cpu(&fe->id1.bitmap1.i_used, le16_to_cpu(bg->bg_bits) - in ocfs2_block_group_alloc()
729 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
730 le32_add_cpu(&fe->id1.bitmap1.i_total, le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
731 le32_add_cpu(&fe->i_clusters, le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
1350 BUG_ON(le16_to_cpu(bg->bg_free_bits_count) < num_bits); in ocfs2_block_group_set_bits()
1367 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_set_bits()
1370 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_set_bits()
1371 le16_to_cpu(bg->bg_free_bits_count), in ocfs2_block_group_set_bits()
1391 while (curr < le16_to_cpu(cl->cl_next_free_rec)) { in ocfs2_find_victim_chain()
1398 BUG_ON(best >= le16_to_cpu(cl->cl_next_free_rec)); in ocfs2_find_victim_chain()
1470 return le16_to_cpu(bg->bg_free_bits_count) > wanted; in ocfs2_block_group_reasonably_empty()
1491 max_bits = le16_to_cpu(gd->bg_bits); in ocfs2_cluster_group_search()
1506 le16_to_cpu(gd->bg_bits), in ocfs2_cluster_group_search()
1562 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_search()
1624 unsigned int bpc = le16_to_cpu(cl->cl_bpc); in ocfs2_bg_discontig_fix_by_rec()
1626 unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc; in ocfs2_bg_discontig_fix_by_rec()
1660 for (i = 0; i < le16_to_cpu(bg->bg_list.l_next_free_rec); i++) { in ocfs2_bg_discontig_fix_result()
1712 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1723 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1728 *bits_left = le16_to_cpu(gd->bg_free_bits_count); in ocfs2_search_one_group()
1866 *bits_left = le16_to_cpu(bg->bg_free_bits_count); in ocfs2_search_chain()
1952 for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i ++) { in ocfs2_claim_suballoc_bits()
2044 else if (le16_to_cpu(di->i_suballoc_slot) == ac->ac_alloc_slot) { in ocfs2_init_inode_ac_group()
2050 le16_to_cpu(di->i_suballoc_bit)); in ocfs2_init_inode_ac_group()
2152 chain = le16_to_cpu(bg->bg_chain); in ocfs2_claim_new_inode_at_loc()
2427 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_clear_bits()
2432 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_clear_bits()
2433 le16_to_cpu(bg->bg_free_bits_count), in ocfs2_block_group_clear_bits()
2485 BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits)); in _ocfs2_free_suballoc_bits()
2504 le32_add_cpu(&cl->cl_recs[le16_to_cpu(group->bg_chain)].c_free, in _ocfs2_free_suballoc_bits()
2532 u16 bit = le16_to_cpu(di->i_suballoc_bit); in ocfs2_free_dinode()
2722 if (le16_to_cpu(inode_fe->i_suballoc_slot) != (u16)OCFS2_INVALID_SLOT && in ocfs2_get_suballoc_slot_bit()
2723 (u32)le16_to_cpu(inode_fe->i_suballoc_slot) > osb->max_slots - 1) { in ocfs2_get_suballoc_slot_bit()
2726 (u32)le16_to_cpu(inode_fe->i_suballoc_slot)); in ocfs2_get_suballoc_slot_bit()
2732 *suballoc_slot = le16_to_cpu(inode_fe->i_suballoc_slot); in ocfs2_get_suballoc_slot_bit()
2734 *suballoc_bit = le16_to_cpu(inode_fe->i_suballoc_bit); in ocfs2_get_suballoc_slot_bit()