• Home
  • Raw
  • Download

Lines Matching refs:rec

891 	struct ocfs2_refcount_rec *rec = NULL;  in ocfs2_find_refcount_rec_in_rl()  local
894 rec = &rb->rf_records.rl_recs[i]; in ocfs2_find_refcount_rec_in_rl()
896 if (le64_to_cpu(rec->r_cpos) + in ocfs2_find_refcount_rec_in_rl()
897 le32_to_cpu(rec->r_clusters) <= cpos) in ocfs2_find_refcount_rec_in_rl()
899 else if (le64_to_cpu(rec->r_cpos) > cpos) in ocfs2_find_refcount_rec_in_rl()
904 *ret_rec = *rec; in ocfs2_find_refcount_rec_in_rl()
913 le64_to_cpu(rec->r_cpos) < cpos + len) in ocfs2_find_refcount_rec_in_rl()
915 cpu_to_le32(le64_to_cpu(rec->r_cpos) - cpos); in ocfs2_find_refcount_rec_in_rl()
1074 struct ocfs2_extent_rec *rec = NULL; in ocfs2_get_refcount_rec() local
1113 rec = &el->l_recs[i]; in ocfs2_get_refcount_rec()
1115 if (le32_to_cpu(rec->e_cpos) <= low_cpos) { in ocfs2_get_refcount_rec()
1133 ret = ocfs2_read_refcount_block(ci, le64_to_cpu(rec->e_blkno), in ocfs2_get_refcount_rec()
1250 struct ocfs2_refcount_rec *rec = &rl->rl_recs[index]; in ocfs2_change_refcount_rec() local
1261 index, le32_to_cpu(rec->r_refcount), change); in ocfs2_change_refcount_rec()
1262 le32_add_cpu(&rec->r_refcount, change); in ocfs2_change_refcount_rec()
1264 if (!rec->r_refcount) { in ocfs2_change_refcount_rec()
1266 memmove(rec, rec + 1, in ocfs2_change_refcount_rec()
1662 struct ocfs2_refcount_rec *rec) in ocfs2_adjust_refcount_rec() argument
1677 new_cpos = le64_to_cpu(rec->r_cpos) & OCFS2_32BIT_POS_MASK; in ocfs2_adjust_refcount_rec()
1746 struct ocfs2_refcount_rec *rec, in ocfs2_insert_refcount_rec() argument
1759 u64 cpos = le64_to_cpu(rec->r_cpos); in ocfs2_insert_refcount_rec()
1760 u32 len = le32_to_cpu(rec->r_clusters); in ocfs2_insert_refcount_rec()
1797 (unsigned long long)le64_to_cpu(rec->r_cpos), in ocfs2_insert_refcount_rec()
1798 le32_to_cpu(rec->r_clusters), le32_to_cpu(rec->r_refcount)); in ocfs2_insert_refcount_rec()
1800 rf_list->rl_recs[index] = *rec; in ocfs2_insert_refcount_rec()
1812 ref_leaf_bh, rec); in ocfs2_insert_refcount_rec()
1995 struct ocfs2_refcount_rec rec; in __ocfs2_increase_refcount() local
2004 cpos, len, &rec, &index, in __ocfs2_increase_refcount()
2011 set_len = le32_to_cpu(rec.r_clusters); in __ocfs2_increase_refcount()
2023 if (rec.r_refcount && le64_to_cpu(rec.r_cpos) == cpos && in __ocfs2_increase_refcount()
2027 le32_to_cpu(rec.r_refcount)); in __ocfs2_increase_refcount()
2035 } else if (!rec.r_refcount) { in __ocfs2_increase_refcount()
2036 rec.r_refcount = cpu_to_le32(1); in __ocfs2_increase_refcount()
2039 (unsigned long long)le64_to_cpu(rec.r_cpos), in __ocfs2_increase_refcount()
2043 &rec, index, in __ocfs2_increase_refcount()
2051 le64_to_cpu(rec.r_cpos) + set_len) - cpos; in __ocfs2_increase_refcount()
2052 rec.r_cpos = cpu_to_le64(cpos); in __ocfs2_increase_refcount()
2053 rec.r_clusters = cpu_to_le32(set_len); in __ocfs2_increase_refcount()
2054 le32_add_cpu(&rec.r_refcount, 1); in __ocfs2_increase_refcount()
2057 (unsigned long long)le64_to_cpu(rec.r_cpos), in __ocfs2_increase_refcount()
2058 set_len, le32_to_cpu(rec.r_refcount)); in __ocfs2_increase_refcount()
2061 &rec, index, merge, in __ocfs2_increase_refcount()
2183 struct ocfs2_refcount_rec *rec = &rb->rf_records.rl_recs[index]; in ocfs2_decrease_refcount_rec() local
2185 BUG_ON(cpos < le64_to_cpu(rec->r_cpos)); in ocfs2_decrease_refcount_rec()
2187 le64_to_cpu(rec->r_cpos) + le32_to_cpu(rec->r_clusters)); in ocfs2_decrease_refcount_rec()
2193 if (cpos == le64_to_cpu(rec->r_cpos) && in ocfs2_decrease_refcount_rec()
2194 len == le32_to_cpu(rec->r_clusters)) in ocfs2_decrease_refcount_rec()
2198 struct ocfs2_refcount_rec split = *rec; in ocfs2_decrease_refcount_rec()
2237 struct ocfs2_refcount_rec rec; in __ocfs2_decrease_refcount() local
2248 cpos, len, &rec, &index, in __ocfs2_decrease_refcount()
2255 r_count = le32_to_cpu(rec.r_refcount); in __ocfs2_decrease_refcount()
2260 r_len = min((u64)(cpos + len), le64_to_cpu(rec.r_cpos) + in __ocfs2_decrease_refcount()
2261 le32_to_cpu(rec.r_clusters)) - cpos; in __ocfs2_decrease_refcount()
2272 if (le32_to_cpu(rec.r_refcount) == 1 && delete) { in __ocfs2_decrease_refcount()
2388 struct ocfs2_refcount_rec rec; in ocfs2_calc_refcount_meta_credits() local
2394 cpos, clusters, &rec, in ocfs2_calc_refcount_meta_credits()
2425 (unsigned long long)le64_to_cpu(rec.r_cpos), in ocfs2_calc_refcount_meta_credits()
2426 le32_to_cpu(rec.r_clusters), in ocfs2_calc_refcount_meta_credits()
2427 le32_to_cpu(rec.r_refcount), index); in ocfs2_calc_refcount_meta_credits()
2429 len = min((u64)cpos + clusters, le64_to_cpu(rec.r_cpos) + in ocfs2_calc_refcount_meta_credits()
2430 le32_to_cpu(rec.r_clusters)) - cpos; in ocfs2_calc_refcount_meta_credits()
2450 if (rec.r_refcount) { in ocfs2_calc_refcount_meta_credits()
2454 cpos != le64_to_cpu(rec.r_cpos)) in ocfs2_calc_refcount_meta_credits()
2458 if (cpos + clusters < le64_to_cpu(rec.r_cpos) + in ocfs2_calc_refcount_meta_credits()
2459 le32_to_cpu(rec.r_clusters)) in ocfs2_calc_refcount_meta_credits()
2649 struct ocfs2_extent_rec *rec; in ocfs2_refcount_cal_cow_clusters() local
2677 rec = &el->l_recs[i]; in ocfs2_refcount_cal_cow_clusters()
2679 if (ocfs2_is_empty_extent(rec)) { in ocfs2_refcount_cal_cow_clusters()
2685 if (le32_to_cpu(rec->e_cpos) + in ocfs2_refcount_cal_cow_clusters()
2686 le16_to_cpu(rec->e_leaf_clusters) <= cpos) in ocfs2_refcount_cal_cow_clusters()
2694 BUG_ON(!(rec->e_flags & OCFS2_EXT_REFCOUNTED)); in ocfs2_refcount_cal_cow_clusters()
2695 *cow_start = le32_to_cpu(rec->e_cpos); in ocfs2_refcount_cal_cow_clusters()
2702 if ((!(rec->e_flags & OCFS2_EXT_REFCOUNTED)) || in ocfs2_refcount_cal_cow_clusters()
2703 (*cow_len && rec_end != le32_to_cpu(rec->e_cpos)) || in ocfs2_refcount_cal_cow_clusters()
2704 (max_cpos <= le32_to_cpu(rec->e_cpos))) in ocfs2_refcount_cal_cow_clusters()
2707 leaf_clusters = le16_to_cpu(rec->e_leaf_clusters); in ocfs2_refcount_cal_cow_clusters()
2708 rec_end = le32_to_cpu(rec->e_cpos) + leaf_clusters; in ocfs2_refcount_cal_cow_clusters()
2711 leaf_clusters = rec_end - le32_to_cpu(rec->e_cpos); in ocfs2_refcount_cal_cow_clusters()
3216 struct ocfs2_refcount_rec rec; in ocfs2_make_clusters_writable() local
3248 &rec, &index, &ref_leaf_bh); in ocfs2_make_clusters_writable()
3254 BUG_ON(!rec.r_refcount); in ocfs2_make_clusters_writable()
3256 le64_to_cpu(rec.r_cpos) + in ocfs2_make_clusters_writable()
3257 le32_to_cpu(rec.r_clusters)) - p_cluster; in ocfs2_make_clusters_writable()
3266 if (le32_to_cpu(rec.r_refcount) == 1) { in ocfs2_make_clusters_writable()
3548 struct ocfs2_refcount_rec rec; in ocfs2_refcounted_xattr_delete_need() local
3565 &rec, &index, in ocfs2_refcounted_xattr_delete_need()
3572 BUG_ON(!rec.r_refcount); in ocfs2_refcounted_xattr_delete_need()
3591 if (num_clusters <= le32_to_cpu(rec.r_clusters)) in ocfs2_refcounted_xattr_delete_need()
3594 num_clusters -= le32_to_cpu(rec.r_clusters); in ocfs2_refcounted_xattr_delete_need()