Lines Matching refs:index
878 int *index)
913 *index = i;
954 * el->l_recs[index].e_blkno.
960 int index, u32 *cpos_end)
970 if (index < le16_to_cpu(el->l_next_free_rec) - 1) {
972 * We have a extent rec after index, so just use the e_cpos
975 *cpos_end = le32_to_cpu(el->l_recs[index+1].e_cpos);
1003 cpos = le32_to_cpu(eb->h_list.l_recs[index].e_cpos);
1060 int *index,
1075 ret_rec, index);
1133 ret_rec, index);
1149 int index)
1151 if ((rb->rf_records.rl_recs[index].r_refcount ==
1152 rb->rf_records.rl_recs[index + 1].r_refcount) &&
1153 (le64_to_cpu(rb->rf_records.rl_recs[index].r_cpos) +
1154 le32_to_cpu(rb->rf_records.rl_recs[index].r_clusters) ==
1155 le64_to_cpu(rb->rf_records.rl_recs[index + 1].r_cpos)))
1163 int index)
1167 if (index < le16_to_cpu(rb->rf_records.rl_used) - 1)
1168 ret = ocfs2_refcount_rec_adjacent(rb, index);
1170 if (index > 0) {
1173 tmp = ocfs2_refcount_rec_adjacent(rb, index - 1);
1187 int index)
1189 BUG_ON(rb->rf_records.rl_recs[index].r_refcount !=
1190 rb->rf_records.rl_recs[index+1].r_refcount);
1192 le32_add_cpu(&rb->rf_records.rl_recs[index].r_clusters,
1193 le32_to_cpu(rb->rf_records.rl_recs[index+1].r_clusters));
1195 if (index < le16_to_cpu(rb->rf_records.rl_used) - 2)
1196 memmove(&rb->rf_records.rl_recs[index + 1],
1197 &rb->rf_records.rl_recs[index + 2],
1199 (le16_to_cpu(rb->rf_records.rl_used) - index - 2));
1210 int index)
1213 ocfs2_refcount_rec_contig(rb, index);
1219 BUG_ON(index == 0);
1220 index--;
1223 ocfs2_rotate_refcount_rec_left(rb, index);
1226 ocfs2_rotate_refcount_rec_left(rb, index);
1230 * Change the refcount indexed by "index" in ref_bh.
1236 int index, int merge, int change)
1242 struct ocfs2_refcount_rec *rec = &rl->rl_recs[index];
1253 index, le32_to_cpu(rec->r_refcount), change);
1257 if (index != le16_to_cpu(rl->rl_used) - 1) {
1259 (le16_to_cpu(rl->rl_used) - index - 1) *
1267 ocfs2_refcount_rec_merge(rb, index);
1647 * Only called when we have inserted a new refcount rec at index 0
1739 int index, int merge,
1762 cpos, len, NULL, &index,
1781 if (index < le16_to_cpu(rf_list->rl_used))
1782 memmove(&rf_list->rl_recs[index + 1],
1783 &rf_list->rl_recs[index],
1784 (le16_to_cpu(rf_list->rl_used) - index) *
1788 (unsigned long long)ref_leaf_bh->b_blocknr, index,
1792 rf_list->rl_recs[index] = *rec;
1797 ocfs2_refcount_rec_merge(rb, index);
1801 if (index == 0) {
1814 * Split the refcount_rec indexed by "index" in ref_leaf_bh.
1827 int index, int merge,
1836 struct ocfs2_refcount_rec *orig_rec = &rf_list->rl_recs[index];
1892 cpos, len, &tmp_rec, &index,
1902 orig_rec = &rf_list->rl_recs[index];
1915 * after "index" to the end.
1917 if (index != le16_to_cpu(rf_list->rl_used) - 1)
1918 memmove(&rf_list->rl_recs[index + 1 + recs_need],
1919 &rf_list->rl_recs[index + 1],
1920 (le16_to_cpu(rf_list->rl_used) - index - 1) *
1933 tail_rec = &rf_list->rl_recs[index + recs_need];
1954 index++;
1960 rf_list->rl_recs[index] = *split_rec;
1962 (unsigned long long)ref_leaf_bh->b_blocknr, index,
1968 ocfs2_refcount_rec_merge(rb, index);
1985 int ret = 0, index;
1996 cpos, len, &rec, &index,
2021 ref_leaf_bh, index,
2035 &rec, index,
2053 &rec, index, merge,
2168 int index, u64 cpos, unsigned int len,
2175 struct ocfs2_refcount_rec *rec = &rb->rf_records.rl_recs[index];
2188 ref_leaf_bh, index, 1, -1);
2198 &split, index, 1,
2228 int ret = 0, index = 0;
2240 cpos, len, &rec, &index,
2256 ref_leaf_bh, index,
2376 int ret = 0, index, ref_blocks = 0, recs_add = 0;
2386 &index, &ref_leaf_bh);
2418 le32_to_cpu(rec.r_refcount), index);
2671 "index %d\n", inode->i_ino, i);
3063 int ret, index;
3096 index = ocfs2_search_extent_list(el, cpos);
3097 if (index == -1) {
3104 ret = ocfs2_split_extent(handle, et, path, index,
3180 int ret, delete, index, credits = 0;
3219 &rec, &index, &ref_leaf_bh);
3514 int ret = 0, index, ref_blocks = 0;
3535 &rec, &index,