Lines Matching refs:rec
883 struct ocfs2_refcount_rec *rec = NULL; in ocfs2_find_refcount_rec_in_rl() local
886 rec = &rb->rf_records.rl_recs[i]; in ocfs2_find_refcount_rec_in_rl()
888 if (le64_to_cpu(rec->r_cpos) + in ocfs2_find_refcount_rec_in_rl()
889 le32_to_cpu(rec->r_clusters) <= cpos) in ocfs2_find_refcount_rec_in_rl()
891 else if (le64_to_cpu(rec->r_cpos) > cpos) in ocfs2_find_refcount_rec_in_rl()
896 *ret_rec = *rec; in ocfs2_find_refcount_rec_in_rl()
905 le64_to_cpu(rec->r_cpos) < cpos + len) in ocfs2_find_refcount_rec_in_rl()
907 cpu_to_le32(le64_to_cpu(rec->r_cpos) - cpos); in ocfs2_find_refcount_rec_in_rl()
1066 struct ocfs2_extent_rec *rec = NULL; in ocfs2_get_refcount_rec() local
1105 rec = &el->l_recs[i]; in ocfs2_get_refcount_rec()
1107 if (le32_to_cpu(rec->e_cpos) <= low_cpos) { in ocfs2_get_refcount_rec()
1125 ret = ocfs2_read_refcount_block(ci, le64_to_cpu(rec->e_blkno), in ocfs2_get_refcount_rec()
1242 struct ocfs2_refcount_rec *rec = &rl->rl_recs[index]; in ocfs2_change_refcount_rec() local
1253 index, le32_to_cpu(rec->r_refcount), change); in ocfs2_change_refcount_rec()
1254 le32_add_cpu(&rec->r_refcount, change); in ocfs2_change_refcount_rec()
1256 if (!rec->r_refcount) { in ocfs2_change_refcount_rec()
1258 memmove(rec, rec + 1, in ocfs2_change_refcount_rec()
1654 struct ocfs2_refcount_rec *rec) in ocfs2_adjust_refcount_rec() argument
1669 new_cpos = le64_to_cpu(rec->r_cpos) & OCFS2_32BIT_POS_MASK; in ocfs2_adjust_refcount_rec()
1738 struct ocfs2_refcount_rec *rec, in ocfs2_insert_refcount_rec() argument
1751 u64 cpos = le64_to_cpu(rec->r_cpos); in ocfs2_insert_refcount_rec()
1752 u32 len = le32_to_cpu(rec->r_clusters); in ocfs2_insert_refcount_rec()
1789 (unsigned long long)le64_to_cpu(rec->r_cpos), in ocfs2_insert_refcount_rec()
1790 le32_to_cpu(rec->r_clusters), le32_to_cpu(rec->r_refcount)); in ocfs2_insert_refcount_rec()
1792 rf_list->rl_recs[index] = *rec; in ocfs2_insert_refcount_rec()
1804 ref_leaf_bh, rec); in ocfs2_insert_refcount_rec()
1987 struct ocfs2_refcount_rec rec; in __ocfs2_increase_refcount() local
1996 cpos, len, &rec, &index, in __ocfs2_increase_refcount()
2003 set_len = le32_to_cpu(rec.r_clusters); in __ocfs2_increase_refcount()
2015 if (rec.r_refcount && le64_to_cpu(rec.r_cpos) == cpos && in __ocfs2_increase_refcount()
2019 le32_to_cpu(rec.r_refcount)); in __ocfs2_increase_refcount()
2027 } else if (!rec.r_refcount) { in __ocfs2_increase_refcount()
2028 rec.r_refcount = cpu_to_le32(1); in __ocfs2_increase_refcount()
2031 (unsigned long long)le64_to_cpu(rec.r_cpos), in __ocfs2_increase_refcount()
2035 &rec, index, in __ocfs2_increase_refcount()
2043 le64_to_cpu(rec.r_cpos) + set_len) - cpos; in __ocfs2_increase_refcount()
2044 rec.r_cpos = cpu_to_le64(cpos); in __ocfs2_increase_refcount()
2045 rec.r_clusters = cpu_to_le32(set_len); in __ocfs2_increase_refcount()
2046 le32_add_cpu(&rec.r_refcount, 1); in __ocfs2_increase_refcount()
2049 (unsigned long long)le64_to_cpu(rec.r_cpos), in __ocfs2_increase_refcount()
2050 set_len, le32_to_cpu(rec.r_refcount)); in __ocfs2_increase_refcount()
2053 &rec, index, merge, in __ocfs2_increase_refcount()
2175 struct ocfs2_refcount_rec *rec = &rb->rf_records.rl_recs[index]; in ocfs2_decrease_refcount_rec() local
2177 BUG_ON(cpos < le64_to_cpu(rec->r_cpos)); in ocfs2_decrease_refcount_rec()
2179 le64_to_cpu(rec->r_cpos) + le32_to_cpu(rec->r_clusters)); in ocfs2_decrease_refcount_rec()
2185 if (cpos == le64_to_cpu(rec->r_cpos) && in ocfs2_decrease_refcount_rec()
2186 len == le32_to_cpu(rec->r_clusters)) in ocfs2_decrease_refcount_rec()
2190 struct ocfs2_refcount_rec split = *rec; in ocfs2_decrease_refcount_rec()
2229 struct ocfs2_refcount_rec rec; in __ocfs2_decrease_refcount() local
2240 cpos, len, &rec, &index, in __ocfs2_decrease_refcount()
2247 r_count = le32_to_cpu(rec.r_refcount); in __ocfs2_decrease_refcount()
2252 r_len = min((u64)(cpos + len), le64_to_cpu(rec.r_cpos) + in __ocfs2_decrease_refcount()
2253 le32_to_cpu(rec.r_clusters)) - cpos; in __ocfs2_decrease_refcount()
2264 if (le32_to_cpu(rec.r_refcount) == 1 && delete) { in __ocfs2_decrease_refcount()
2379 struct ocfs2_refcount_rec rec; in ocfs2_calc_refcount_meta_credits() local
2385 cpos, clusters, &rec, in ocfs2_calc_refcount_meta_credits()
2416 (unsigned long long)le64_to_cpu(rec.r_cpos), in ocfs2_calc_refcount_meta_credits()
2417 le32_to_cpu(rec.r_clusters), in ocfs2_calc_refcount_meta_credits()
2418 le32_to_cpu(rec.r_refcount), index); in ocfs2_calc_refcount_meta_credits()
2420 len = min((u64)cpos + clusters, le64_to_cpu(rec.r_cpos) + in ocfs2_calc_refcount_meta_credits()
2421 le32_to_cpu(rec.r_clusters)) - cpos; in ocfs2_calc_refcount_meta_credits()
2441 if (rec.r_refcount) { in ocfs2_calc_refcount_meta_credits()
2445 cpos != le64_to_cpu(rec.r_cpos)) in ocfs2_calc_refcount_meta_credits()
2449 if (cpos + clusters < le64_to_cpu(rec.r_cpos) + in ocfs2_calc_refcount_meta_credits()
2450 le32_to_cpu(rec.r_clusters)) in ocfs2_calc_refcount_meta_credits()
2639 struct ocfs2_extent_rec *rec; in ocfs2_refcount_cal_cow_clusters() local
2667 rec = &el->l_recs[i]; in ocfs2_refcount_cal_cow_clusters()
2669 if (ocfs2_is_empty_extent(rec)) { in ocfs2_refcount_cal_cow_clusters()
2675 if (le32_to_cpu(rec->e_cpos) + in ocfs2_refcount_cal_cow_clusters()
2676 le16_to_cpu(rec->e_leaf_clusters) <= cpos) in ocfs2_refcount_cal_cow_clusters()
2684 BUG_ON(!(rec->e_flags & OCFS2_EXT_REFCOUNTED)); in ocfs2_refcount_cal_cow_clusters()
2685 *cow_start = le32_to_cpu(rec->e_cpos); in ocfs2_refcount_cal_cow_clusters()
2692 if ((!(rec->e_flags & OCFS2_EXT_REFCOUNTED)) || in ocfs2_refcount_cal_cow_clusters()
2693 (*cow_len && rec_end != le32_to_cpu(rec->e_cpos)) || in ocfs2_refcount_cal_cow_clusters()
2694 (max_cpos <= le32_to_cpu(rec->e_cpos))) in ocfs2_refcount_cal_cow_clusters()
2697 leaf_clusters = le16_to_cpu(rec->e_leaf_clusters); in ocfs2_refcount_cal_cow_clusters()
2698 rec_end = le32_to_cpu(rec->e_cpos) + leaf_clusters; in ocfs2_refcount_cal_cow_clusters()
2701 leaf_clusters = rec_end - le32_to_cpu(rec->e_cpos); in ocfs2_refcount_cal_cow_clusters()
3214 struct ocfs2_refcount_rec rec; in ocfs2_make_clusters_writable() local
3246 &rec, &index, &ref_leaf_bh); in ocfs2_make_clusters_writable()
3252 BUG_ON(!rec.r_refcount); in ocfs2_make_clusters_writable()
3254 le64_to_cpu(rec.r_cpos) + in ocfs2_make_clusters_writable()
3255 le32_to_cpu(rec.r_clusters)) - p_cluster; in ocfs2_make_clusters_writable()
3264 if (le32_to_cpu(rec.r_refcount) == 1) { in ocfs2_make_clusters_writable()
3545 struct ocfs2_refcount_rec rec; in ocfs2_refcounted_xattr_delete_need() local
3562 &rec, &index, in ocfs2_refcounted_xattr_delete_need()
3569 BUG_ON(!rec.r_refcount); in ocfs2_refcounted_xattr_delete_need()
3588 if (num_clusters <= le32_to_cpu(rec.r_clusters)) in ocfs2_refcounted_xattr_delete_need()
3591 num_clusters -= le32_to_cpu(rec.r_clusters); in ocfs2_refcounted_xattr_delete_need()