Lines Matching refs:le16_to_cpu
164 return (u32)le16_to_cpu(cl->cl_cpg) * (u32)le16_to_cpu(cl->cl_bpc); in ocfs2_bits_per_group()
199 if (le16_to_cpu(gd->bg_free_bits_count) > le16_to_cpu(gd->bg_bits)) { in ocfs2_validate_gd_self()
202 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
203 le16_to_cpu(gd->bg_free_bits_count)); in ocfs2_validate_gd_self()
206 if (le16_to_cpu(gd->bg_bits) > (8 * le16_to_cpu(gd->bg_size))) { in ocfs2_validate_gd_self()
209 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
210 8 * le16_to_cpu(gd->bg_size)); in ocfs2_validate_gd_self()
231 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()
232 if (le16_to_cpu(gd->bg_bits) > max_bits) { in ocfs2_validate_gd_parent()
235 le16_to_cpu(gd->bg_bits)); in ocfs2_validate_gd_parent()
239 if ((le16_to_cpu(gd->bg_chain) > in ocfs2_validate_gd_parent()
240 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) || in ocfs2_validate_gd_parent()
241 ((le16_to_cpu(gd->bg_chain) == in ocfs2_validate_gd_parent()
242 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) && !resize)) { in ocfs2_validate_gd_parent()
245 le16_to_cpu(gd->bg_chain)); in ocfs2_validate_gd_parent()
347 rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec)]; in ocfs2_bg_discontig_add_extent()
349 rec->e_cpos = cpu_to_le32(le16_to_cpu(bg->bg_bits) / in ocfs2_bg_discontig_add_extent()
350 le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
352 le16_add_cpu(&bg->bg_bits, clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
354 clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
397 if (group_clusters == le16_to_cpu(cl->cl_cpg)) in ocfs2_block_group_fill()
405 bg->bg_free_bits_count = cpu_to_le16(le16_to_cpu(bg->bg_bits) - 1); in ocfs2_block_group_fill()
425 while (curr < le16_to_cpu(cl->cl_count)) { in ocfs2_find_smallest_chain()
447 le16_to_cpu(cl->cl_cpg), &bit_off, in ocfs2_block_group_alloc_contig()
510 unsigned int needed = le16_to_cpu(cl->cl_cpg) - in ocfs2_block_group_grow_discontig()
511 le16_to_cpu(bg->bg_bits) / le16_to_cpu(cl->cl_bpc); in ocfs2_block_group_grow_discontig()
525 while ((needed > 0) && (le16_to_cpu(el->l_next_free_rec) < in ocfs2_block_group_grow_discontig()
526 le16_to_cpu(el->l_count))) { in ocfs2_block_group_grow_discontig()
542 needed = le16_to_cpu(cl->cl_cpg) - in ocfs2_block_group_grow_discontig()
543 le16_to_cpu(bg->bg_bits) / le16_to_cpu(cl->cl_bpc); in ocfs2_block_group_grow_discontig()
576 for (i = 0; i < le16_to_cpu(el->l_next_free_rec); i++) { in ocfs2_bg_alloc_cleanup()
581 le16_to_cpu(rec->e_leaf_clusters)); in ocfs2_bg_alloc_cleanup()
600 unsigned int min_bits = le16_to_cpu(cl->cl_cpg) >> 1; in ocfs2_block_group_alloc_discontig()
689 le16_to_cpu(cl->cl_cpg), in ocfs2_block_group_alloc()
698 le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
735 alloc_rec = le16_to_cpu(bg->bg_chain); in ocfs2_block_group_alloc()
737 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
739 le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
741 if (le16_to_cpu(cl->cl_next_free_rec) < le16_to_cpu(cl->cl_count)) in ocfs2_block_group_alloc()
744 le32_add_cpu(&fe->id1.bitmap1.i_used, le16_to_cpu(bg->bg_bits) - in ocfs2_block_group_alloc()
745 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
746 le32_add_cpu(&fe->id1.bitmap1.i_total, le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
747 le32_add_cpu(&fe->i_clusters, le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
1339 BUG_ON(le16_to_cpu(bg->bg_free_bits_count) < num_bits); in ocfs2_block_group_set_bits()
1356 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_set_bits()
1359 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_set_bits()
1360 le16_to_cpu(bg->bg_free_bits_count), in ocfs2_block_group_set_bits()
1380 while (curr < le16_to_cpu(cl->cl_next_free_rec)) { in ocfs2_find_victim_chain()
1387 BUG_ON(best >= le16_to_cpu(cl->cl_next_free_rec)); in ocfs2_find_victim_chain()
1459 return le16_to_cpu(bg->bg_free_bits_count) > wanted; in ocfs2_block_group_reasonably_empty()
1480 max_bits = le16_to_cpu(gd->bg_bits); in ocfs2_cluster_group_search()
1495 le16_to_cpu(gd->bg_bits), in ocfs2_cluster_group_search()
1551 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_search()
1613 unsigned int bpc = le16_to_cpu(cl->cl_bpc); in ocfs2_bg_discontig_fix_by_rec()
1615 unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc; in ocfs2_bg_discontig_fix_by_rec()
1649 for (i = 0; i < le16_to_cpu(bg->bg_list.l_next_free_rec); i++) { in ocfs2_bg_discontig_fix_result()
1701 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1712 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1717 *bits_left = le16_to_cpu(gd->bg_free_bits_count); in ocfs2_search_one_group()
1855 *bits_left = le16_to_cpu(bg->bg_free_bits_count); in ocfs2_search_chain()
1941 for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i ++) { in ocfs2_claim_suballoc_bits()
2033 else if (le16_to_cpu(di->i_suballoc_slot) == ac->ac_alloc_slot) { in ocfs2_init_inode_ac_group()
2039 le16_to_cpu(di->i_suballoc_bit)); in ocfs2_init_inode_ac_group()
2141 chain = le16_to_cpu(bg->bg_chain); in ocfs2_claim_new_inode_at_loc()
2415 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_clear_bits()
2418 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_clear_bits()
2419 le16_to_cpu(bg->bg_free_bits_count), in ocfs2_block_group_clear_bits()
2471 BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits)); in _ocfs2_free_suballoc_bits()
2490 le32_add_cpu(&cl->cl_recs[le16_to_cpu(group->bg_chain)].c_free, in _ocfs2_free_suballoc_bits()
2521 u16 bit = le16_to_cpu(di->i_suballoc_bit); in ocfs2_free_dinode()
2760 if (le16_to_cpu(inode_fe->i_suballoc_slot) != (u16)OCFS2_INVALID_SLOT && in ocfs2_get_suballoc_slot_bit()
2761 (u32)le16_to_cpu(inode_fe->i_suballoc_slot) > osb->max_slots - 1) { in ocfs2_get_suballoc_slot_bit()
2764 (u32)le16_to_cpu(inode_fe->i_suballoc_slot)); in ocfs2_get_suballoc_slot_bit()
2770 *suballoc_slot = le16_to_cpu(inode_fe->i_suballoc_slot); in ocfs2_get_suballoc_slot_bit()
2772 *suballoc_bit = le16_to_cpu(inode_fe->i_suballoc_bit); in ocfs2_get_suballoc_slot_bit()