Lines Matching refs:le16_to_cpu
146 return (u32)le16_to_cpu(cl->cl_cpg) * (u32)le16_to_cpu(cl->cl_bpc); in ocfs2_bits_per_group()
181 if (le16_to_cpu(gd->bg_free_bits_count) > le16_to_cpu(gd->bg_bits)) { in ocfs2_validate_gd_self()
184 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
185 le16_to_cpu(gd->bg_free_bits_count)); in ocfs2_validate_gd_self()
188 if (le16_to_cpu(gd->bg_bits) > (8 * le16_to_cpu(gd->bg_size))) { in ocfs2_validate_gd_self()
191 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
192 8 * le16_to_cpu(gd->bg_size)); in ocfs2_validate_gd_self()
213 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()
214 if (le16_to_cpu(gd->bg_bits) > max_bits) { in ocfs2_validate_gd_parent()
217 le16_to_cpu(gd->bg_bits)); in ocfs2_validate_gd_parent()
221 if ((le16_to_cpu(gd->bg_chain) > in ocfs2_validate_gd_parent()
222 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) || in ocfs2_validate_gd_parent()
223 ((le16_to_cpu(gd->bg_chain) == in ocfs2_validate_gd_parent()
224 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) && !resize)) { in ocfs2_validate_gd_parent()
227 le16_to_cpu(gd->bg_chain)); in ocfs2_validate_gd_parent()
329 rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec)]; in ocfs2_bg_discontig_add_extent()
331 rec->e_cpos = cpu_to_le32(le16_to_cpu(bg->bg_bits) / in ocfs2_bg_discontig_add_extent()
332 le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
334 le16_add_cpu(&bg->bg_bits, clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
336 clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
379 if (group_clusters == le16_to_cpu(cl->cl_cpg)) in ocfs2_block_group_fill()
387 bg->bg_free_bits_count = cpu_to_le16(le16_to_cpu(bg->bg_bits) - 1); in ocfs2_block_group_fill()
407 while (curr < le16_to_cpu(cl->cl_count)) { in ocfs2_find_smallest_chain()
429 le16_to_cpu(cl->cl_cpg), &bit_off, in ocfs2_block_group_alloc_contig()
492 unsigned int needed = le16_to_cpu(cl->cl_cpg) - in ocfs2_block_group_grow_discontig()
493 le16_to_cpu(bg->bg_bits) / le16_to_cpu(cl->cl_bpc); in ocfs2_block_group_grow_discontig()
507 while ((needed > 0) && (le16_to_cpu(el->l_next_free_rec) < in ocfs2_block_group_grow_discontig()
508 le16_to_cpu(el->l_count))) { in ocfs2_block_group_grow_discontig()
524 needed = le16_to_cpu(cl->cl_cpg) - in ocfs2_block_group_grow_discontig()
525 le16_to_cpu(bg->bg_bits) / le16_to_cpu(cl->cl_bpc); in ocfs2_block_group_grow_discontig()
558 for (i = 0; i < le16_to_cpu(el->l_next_free_rec); i++) { in ocfs2_bg_alloc_cleanup()
563 le16_to_cpu(rec->e_leaf_clusters)); in ocfs2_bg_alloc_cleanup()
582 unsigned int min_bits = le16_to_cpu(cl->cl_cpg) >> 1; in ocfs2_block_group_alloc_discontig()
671 le16_to_cpu(cl->cl_cpg), in ocfs2_block_group_alloc()
680 le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
717 alloc_rec = le16_to_cpu(bg->bg_chain); in ocfs2_block_group_alloc()
719 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
721 le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
723 if (le16_to_cpu(cl->cl_next_free_rec) < le16_to_cpu(cl->cl_count)) in ocfs2_block_group_alloc()
726 le32_add_cpu(&fe->id1.bitmap1.i_used, le16_to_cpu(bg->bg_bits) - in ocfs2_block_group_alloc()
727 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
728 le32_add_cpu(&fe->id1.bitmap1.i_total, le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
729 le32_add_cpu(&fe->i_clusters, le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
1352 BUG_ON(le16_to_cpu(bg->bg_free_bits_count) < num_bits); in ocfs2_block_group_set_bits()
1369 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_set_bits()
1372 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_set_bits()
1373 le16_to_cpu(bg->bg_free_bits_count), in ocfs2_block_group_set_bits()
1393 while (curr < le16_to_cpu(cl->cl_next_free_rec)) { in ocfs2_find_victim_chain()
1400 BUG_ON(best >= le16_to_cpu(cl->cl_next_free_rec)); in ocfs2_find_victim_chain()
1472 return le16_to_cpu(bg->bg_free_bits_count) > wanted; in ocfs2_block_group_reasonably_empty()
1493 max_bits = le16_to_cpu(gd->bg_bits); in ocfs2_cluster_group_search()
1508 le16_to_cpu(gd->bg_bits), in ocfs2_cluster_group_search()
1564 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_search()
1626 unsigned int bpc = le16_to_cpu(cl->cl_bpc); in ocfs2_bg_discontig_fix_by_rec()
1628 unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc; in ocfs2_bg_discontig_fix_by_rec()
1662 for (i = 0; i < le16_to_cpu(bg->bg_list.l_next_free_rec); i++) { in ocfs2_bg_discontig_fix_result()
1714 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1725 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1730 *bits_left = le16_to_cpu(gd->bg_free_bits_count); in ocfs2_search_one_group()
1868 *bits_left = le16_to_cpu(bg->bg_free_bits_count); in ocfs2_search_chain()
1954 for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i ++) { in ocfs2_claim_suballoc_bits()
2046 else if (le16_to_cpu(di->i_suballoc_slot) == ac->ac_alloc_slot) { in ocfs2_init_inode_ac_group()
2052 le16_to_cpu(di->i_suballoc_bit)); in ocfs2_init_inode_ac_group()
2154 chain = le16_to_cpu(bg->bg_chain); in ocfs2_claim_new_inode_at_loc()
2429 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_clear_bits()
2434 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_clear_bits()
2435 le16_to_cpu(bg->bg_free_bits_count), in ocfs2_block_group_clear_bits()
2487 BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits)); in _ocfs2_free_suballoc_bits()
2506 le32_add_cpu(&cl->cl_recs[le16_to_cpu(group->bg_chain)].c_free, in _ocfs2_free_suballoc_bits()
2534 u16 bit = le16_to_cpu(di->i_suballoc_bit); in ocfs2_free_dinode()
2724 if (le16_to_cpu(inode_fe->i_suballoc_slot) != (u16)OCFS2_INVALID_SLOT && in ocfs2_get_suballoc_slot_bit()
2725 (u32)le16_to_cpu(inode_fe->i_suballoc_slot) > osb->max_slots - 1) { in ocfs2_get_suballoc_slot_bit()
2728 (u32)le16_to_cpu(inode_fe->i_suballoc_slot)); in ocfs2_get_suballoc_slot_bit()
2734 *suballoc_slot = le16_to_cpu(inode_fe->i_suballoc_slot); in ocfs2_get_suballoc_slot_bit()
2736 *suballoc_bit = le16_to_cpu(inode_fe->i_suballoc_bit); in ocfs2_get_suballoc_slot_bit()