Lines Matching refs:le16_to_cpu
166 return (u32)le16_to_cpu(cl->cl_cpg) * (u32)le16_to_cpu(cl->cl_bpc); in ocfs2_bits_per_group()
206 if (le16_to_cpu(gd->bg_free_bits_count) > le16_to_cpu(gd->bg_bits)) { in ocfs2_validate_gd_self()
210 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
211 le16_to_cpu(gd->bg_free_bits_count)); in ocfs2_validate_gd_self()
215 if (le16_to_cpu(gd->bg_bits) > (8 * le16_to_cpu(gd->bg_size))) { in ocfs2_validate_gd_self()
219 le16_to_cpu(gd->bg_bits), in ocfs2_validate_gd_self()
220 8 * le16_to_cpu(gd->bg_size)); in ocfs2_validate_gd_self()
244 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()
245 if (le16_to_cpu(gd->bg_bits) > max_bits) { in ocfs2_validate_gd_parent()
248 le16_to_cpu(gd->bg_bits)); in ocfs2_validate_gd_parent()
253 if ((le16_to_cpu(gd->bg_chain) > in ocfs2_validate_gd_parent()
254 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) || in ocfs2_validate_gd_parent()
255 ((le16_to_cpu(gd->bg_chain) == in ocfs2_validate_gd_parent()
256 le16_to_cpu(di->id2.i_chain.cl_next_free_rec)) && !resize)) { in ocfs2_validate_gd_parent()
259 le16_to_cpu(gd->bg_chain)); in ocfs2_validate_gd_parent()
362 rec = &el->l_recs[le16_to_cpu(el->l_next_free_rec)]; in ocfs2_bg_discontig_add_extent()
364 rec->e_cpos = cpu_to_le32(le16_to_cpu(bg->bg_bits) / in ocfs2_bg_discontig_add_extent()
365 le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
367 le16_add_cpu(&bg->bg_bits, clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
369 clusters * le16_to_cpu(cl->cl_bpc)); in ocfs2_bg_discontig_add_extent()
413 if (group_clusters == le16_to_cpu(cl->cl_cpg)) in ocfs2_block_group_fill()
421 bg->bg_free_bits_count = cpu_to_le16(le16_to_cpu(bg->bg_bits) - 1); in ocfs2_block_group_fill()
441 while (curr < le16_to_cpu(cl->cl_count)) { in ocfs2_find_smallest_chain()
463 le16_to_cpu(cl->cl_cpg), &bit_off, in ocfs2_block_group_alloc_contig()
526 unsigned int 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()
541 while ((needed > 0) && (le16_to_cpu(el->l_next_free_rec) < in ocfs2_block_group_grow_discontig()
542 le16_to_cpu(el->l_count))) { in ocfs2_block_group_grow_discontig()
558 needed = le16_to_cpu(cl->cl_cpg) - in ocfs2_block_group_grow_discontig()
559 le16_to_cpu(bg->bg_bits) / le16_to_cpu(cl->cl_bpc); in ocfs2_block_group_grow_discontig()
592 for (i = 0; i < le16_to_cpu(el->l_next_free_rec); i++) { in ocfs2_bg_alloc_cleanup()
597 le16_to_cpu(rec->e_leaf_clusters)); in ocfs2_bg_alloc_cleanup()
616 unsigned int min_bits = le16_to_cpu(cl->cl_cpg) >> 1; in ocfs2_block_group_alloc_discontig()
705 le16_to_cpu(cl->cl_cpg), in ocfs2_block_group_alloc()
714 le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
751 alloc_rec = le16_to_cpu(bg->bg_chain); in ocfs2_block_group_alloc()
753 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
755 le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
757 if (le16_to_cpu(cl->cl_next_free_rec) < le16_to_cpu(cl->cl_count)) in ocfs2_block_group_alloc()
760 le32_add_cpu(&fe->id1.bitmap1.i_used, le16_to_cpu(bg->bg_bits) - in ocfs2_block_group_alloc()
761 le16_to_cpu(bg->bg_free_bits_count)); in ocfs2_block_group_alloc()
762 le32_add_cpu(&fe->id1.bitmap1.i_total, le16_to_cpu(bg->bg_bits)); in ocfs2_block_group_alloc()
763 le32_add_cpu(&fe->i_clusters, le16_to_cpu(cl->cl_cpg)); in ocfs2_block_group_alloc()
1355 BUG_ON(le16_to_cpu(bg->bg_free_bits_count) < num_bits); in ocfs2_block_group_set_bits()
1372 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_set_bits()
1376 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_set_bits()
1377 le16_to_cpu(bg->bg_free_bits_count), num_bits); in ocfs2_block_group_set_bits()
1397 while (curr < le16_to_cpu(cl->cl_next_free_rec)) { in ocfs2_find_victim_chain()
1404 BUG_ON(best >= le16_to_cpu(cl->cl_next_free_rec)); in ocfs2_find_victim_chain()
1476 return le16_to_cpu(bg->bg_free_bits_count) > wanted; in ocfs2_block_group_reasonably_empty()
1497 max_bits = le16_to_cpu(gd->bg_bits); in ocfs2_cluster_group_search()
1512 le16_to_cpu(gd->bg_bits), in ocfs2_cluster_group_search()
1568 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_search()
1630 unsigned int bpc = le16_to_cpu(cl->cl_bpc); in ocfs2_bg_discontig_fix_by_rec()
1632 unsigned int bitcount = le16_to_cpu(rec->e_leaf_clusters) * bpc; in ocfs2_bg_discontig_fix_by_rec()
1666 for (i = 0; i < le16_to_cpu(bg->bg_list.l_next_free_rec); i++) { in ocfs2_bg_discontig_fix_result()
1718 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1729 le16_to_cpu(gd->bg_chain)); in ocfs2_search_one_group()
1734 *bits_left = le16_to_cpu(gd->bg_free_bits_count); in ocfs2_search_one_group()
1872 *bits_left = le16_to_cpu(bg->bg_free_bits_count); in ocfs2_search_chain()
1957 for (i = 0; i < le16_to_cpu(cl->cl_next_free_rec); i ++) { in ocfs2_claim_suballoc_bits()
2049 else if (le16_to_cpu(di->i_suballoc_slot) == ac->ac_alloc_slot) { in ocfs2_init_inode_ac_group()
2055 le16_to_cpu(di->i_suballoc_bit)); in ocfs2_init_inode_ac_group()
2157 chain = le16_to_cpu(bg->bg_chain); in ocfs2_claim_new_inode_at_loc()
2431 if (le16_to_cpu(bg->bg_free_bits_count) > le16_to_cpu(bg->bg_bits)) { in ocfs2_block_group_clear_bits()
2435 le16_to_cpu(bg->bg_bits), in ocfs2_block_group_clear_bits()
2436 le16_to_cpu(bg->bg_free_bits_count), num_bits); in ocfs2_block_group_clear_bits()
2488 BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits)); in _ocfs2_free_suballoc_bits()
2507 le32_add_cpu(&cl->cl_recs[le16_to_cpu(group->bg_chain)].c_free, in _ocfs2_free_suballoc_bits()
2538 u16 bit = le16_to_cpu(di->i_suballoc_bit); in ocfs2_free_dinode()
2777 if (le16_to_cpu(inode_fe->i_suballoc_slot) != (u16)OCFS2_INVALID_SLOT && in ocfs2_get_suballoc_slot_bit()
2778 (u32)le16_to_cpu(inode_fe->i_suballoc_slot) > osb->max_slots - 1) { in ocfs2_get_suballoc_slot_bit()
2781 (u32)le16_to_cpu(inode_fe->i_suballoc_slot)); in ocfs2_get_suballoc_slot_bit()
2787 *suballoc_slot = le16_to_cpu(inode_fe->i_suballoc_slot); in ocfs2_get_suballoc_slot_bit()
2789 *suballoc_bit = le16_to_cpu(inode_fe->i_suballoc_bit); in ocfs2_get_suballoc_slot_bit()