Lines Matching refs:rec
893 struct ocfs2_refcount_rec *rec = NULL; in ocfs2_find_refcount_rec_in_rl() local
896 rec = &rb->rf_records.rl_recs[i]; in ocfs2_find_refcount_rec_in_rl()
898 if (le64_to_cpu(rec->r_cpos) + in ocfs2_find_refcount_rec_in_rl()
899 le32_to_cpu(rec->r_clusters) <= cpos) in ocfs2_find_refcount_rec_in_rl()
901 else if (le64_to_cpu(rec->r_cpos) > cpos) in ocfs2_find_refcount_rec_in_rl()
906 *ret_rec = *rec; in ocfs2_find_refcount_rec_in_rl()
915 le64_to_cpu(rec->r_cpos) < cpos + len) in ocfs2_find_refcount_rec_in_rl()
917 cpu_to_le32(le64_to_cpu(rec->r_cpos) - cpos); in ocfs2_find_refcount_rec_in_rl()
1076 struct ocfs2_extent_rec *rec = NULL; in ocfs2_get_refcount_rec() local
1117 rec = &el->l_recs[i]; in ocfs2_get_refcount_rec()
1119 if (le32_to_cpu(rec->e_cpos) <= low_cpos) { in ocfs2_get_refcount_rec()
1137 ret = ocfs2_read_refcount_block(ci, le64_to_cpu(rec->e_blkno), in ocfs2_get_refcount_rec()
1254 struct ocfs2_refcount_rec *rec = &rl->rl_recs[index]; in ocfs2_change_refcount_rec() local
1265 index, le32_to_cpu(rec->r_refcount), change); in ocfs2_change_refcount_rec()
1266 le32_add_cpu(&rec->r_refcount, change); in ocfs2_change_refcount_rec()
1268 if (!rec->r_refcount) { in ocfs2_change_refcount_rec()
1270 memmove(rec, rec + 1, in ocfs2_change_refcount_rec()
1668 struct ocfs2_refcount_rec *rec) in ocfs2_adjust_refcount_rec() argument
1683 new_cpos = le64_to_cpu(rec->r_cpos) & OCFS2_32BIT_POS_MASK; in ocfs2_adjust_refcount_rec()
1752 struct ocfs2_refcount_rec *rec, in ocfs2_insert_refcount_rec() argument
1765 u64 cpos = le64_to_cpu(rec->r_cpos); in ocfs2_insert_refcount_rec()
1766 u32 len = le32_to_cpu(rec->r_clusters); in ocfs2_insert_refcount_rec()
1803 (unsigned long long)le64_to_cpu(rec->r_cpos), in ocfs2_insert_refcount_rec()
1804 le32_to_cpu(rec->r_clusters), le32_to_cpu(rec->r_refcount)); in ocfs2_insert_refcount_rec()
1806 rf_list->rl_recs[index] = *rec; in ocfs2_insert_refcount_rec()
1818 ref_leaf_bh, rec); in ocfs2_insert_refcount_rec()
2001 struct ocfs2_refcount_rec rec; in __ocfs2_increase_refcount() local
2010 cpos, len, &rec, &index, in __ocfs2_increase_refcount()
2017 set_len = le32_to_cpu(rec.r_clusters); in __ocfs2_increase_refcount()
2029 if (rec.r_refcount && le64_to_cpu(rec.r_cpos) == cpos && in __ocfs2_increase_refcount()
2033 le32_to_cpu(rec.r_refcount)); in __ocfs2_increase_refcount()
2041 } else if (!rec.r_refcount) { in __ocfs2_increase_refcount()
2042 rec.r_refcount = cpu_to_le32(1); in __ocfs2_increase_refcount()
2045 (unsigned long long)le64_to_cpu(rec.r_cpos), in __ocfs2_increase_refcount()
2049 &rec, index, in __ocfs2_increase_refcount()
2057 le64_to_cpu(rec.r_cpos) + set_len) - cpos; in __ocfs2_increase_refcount()
2058 rec.r_cpos = cpu_to_le64(cpos); in __ocfs2_increase_refcount()
2059 rec.r_clusters = cpu_to_le32(set_len); in __ocfs2_increase_refcount()
2060 le32_add_cpu(&rec.r_refcount, 1); in __ocfs2_increase_refcount()
2063 (unsigned long long)le64_to_cpu(rec.r_cpos), in __ocfs2_increase_refcount()
2064 set_len, le32_to_cpu(rec.r_refcount)); in __ocfs2_increase_refcount()
2067 &rec, index, merge, in __ocfs2_increase_refcount()
2189 struct ocfs2_refcount_rec *rec = &rb->rf_records.rl_recs[index]; in ocfs2_decrease_refcount_rec() local
2191 BUG_ON(cpos < le64_to_cpu(rec->r_cpos)); in ocfs2_decrease_refcount_rec()
2193 le64_to_cpu(rec->r_cpos) + le32_to_cpu(rec->r_clusters)); in ocfs2_decrease_refcount_rec()
2199 if (cpos == le64_to_cpu(rec->r_cpos) && in ocfs2_decrease_refcount_rec()
2200 len == le32_to_cpu(rec->r_clusters)) in ocfs2_decrease_refcount_rec()
2204 struct ocfs2_refcount_rec split = *rec; in ocfs2_decrease_refcount_rec()
2243 struct ocfs2_refcount_rec rec; in __ocfs2_decrease_refcount() local
2254 cpos, len, &rec, &index, in __ocfs2_decrease_refcount()
2261 r_count = le32_to_cpu(rec.r_refcount); in __ocfs2_decrease_refcount()
2266 r_len = min((u64)(cpos + len), le64_to_cpu(rec.r_cpos) + in __ocfs2_decrease_refcount()
2267 le32_to_cpu(rec.r_clusters)) - cpos; in __ocfs2_decrease_refcount()
2278 if (le32_to_cpu(rec.r_refcount) == 1 && delete) { in __ocfs2_decrease_refcount()
2396 struct ocfs2_refcount_rec rec; in ocfs2_calc_refcount_meta_credits() local
2402 cpos, clusters, &rec, in ocfs2_calc_refcount_meta_credits()
2433 (unsigned long long)le64_to_cpu(rec.r_cpos), in ocfs2_calc_refcount_meta_credits()
2434 le32_to_cpu(rec.r_clusters), in ocfs2_calc_refcount_meta_credits()
2435 le32_to_cpu(rec.r_refcount), index); in ocfs2_calc_refcount_meta_credits()
2437 len = min((u64)cpos + clusters, le64_to_cpu(rec.r_cpos) + in ocfs2_calc_refcount_meta_credits()
2438 le32_to_cpu(rec.r_clusters)) - cpos; in ocfs2_calc_refcount_meta_credits()
2458 if (rec.r_refcount) { in ocfs2_calc_refcount_meta_credits()
2462 cpos != le64_to_cpu(rec.r_cpos)) in ocfs2_calc_refcount_meta_credits()
2466 if (cpos + clusters < le64_to_cpu(rec.r_cpos) + in ocfs2_calc_refcount_meta_credits()
2467 le32_to_cpu(rec.r_clusters)) in ocfs2_calc_refcount_meta_credits()
2659 struct ocfs2_extent_rec *rec; in ocfs2_refcount_cal_cow_clusters() local
2688 rec = &el->l_recs[i]; in ocfs2_refcount_cal_cow_clusters()
2690 if (ocfs2_is_empty_extent(rec)) { in ocfs2_refcount_cal_cow_clusters()
2696 if (le32_to_cpu(rec->e_cpos) + in ocfs2_refcount_cal_cow_clusters()
2697 le16_to_cpu(rec->e_leaf_clusters) <= cpos) in ocfs2_refcount_cal_cow_clusters()
2705 BUG_ON(!(rec->e_flags & OCFS2_EXT_REFCOUNTED)); in ocfs2_refcount_cal_cow_clusters()
2706 *cow_start = le32_to_cpu(rec->e_cpos); in ocfs2_refcount_cal_cow_clusters()
2713 if ((!(rec->e_flags & OCFS2_EXT_REFCOUNTED)) || in ocfs2_refcount_cal_cow_clusters()
2714 (*cow_len && rec_end != le32_to_cpu(rec->e_cpos)) || in ocfs2_refcount_cal_cow_clusters()
2715 (max_cpos <= le32_to_cpu(rec->e_cpos))) in ocfs2_refcount_cal_cow_clusters()
2718 leaf_clusters = le16_to_cpu(rec->e_leaf_clusters); in ocfs2_refcount_cal_cow_clusters()
2719 rec_end = le32_to_cpu(rec->e_cpos) + leaf_clusters; in ocfs2_refcount_cal_cow_clusters()
2722 leaf_clusters = rec_end - le32_to_cpu(rec->e_cpos); in ocfs2_refcount_cal_cow_clusters()
3232 struct ocfs2_refcount_rec rec; in ocfs2_make_clusters_writable() local
3264 &rec, &index, &ref_leaf_bh); in ocfs2_make_clusters_writable()
3270 BUG_ON(!rec.r_refcount); in ocfs2_make_clusters_writable()
3272 le64_to_cpu(rec.r_cpos) + in ocfs2_make_clusters_writable()
3273 le32_to_cpu(rec.r_clusters)) - p_cluster; in ocfs2_make_clusters_writable()
3282 if (le32_to_cpu(rec.r_refcount) == 1) { in ocfs2_make_clusters_writable()
3566 struct ocfs2_refcount_rec rec; in ocfs2_refcounted_xattr_delete_need() local
3583 &rec, &index, in ocfs2_refcounted_xattr_delete_need()
3590 BUG_ON(!rec.r_refcount); in ocfs2_refcounted_xattr_delete_need()
3609 if (num_clusters <= le32_to_cpu(rec.r_clusters)) in ocfs2_refcounted_xattr_delete_need()
3612 num_clusters -= le32_to_cpu(rec.r_clusters); in ocfs2_refcounted_xattr_delete_need()