Lines Matching refs:index
880 int *index)
915 *index = i;
956 * el->l_recs[index].e_blkno.
962 int index, u32 *cpos_end)
972 if (index < le16_to_cpu(el->l_next_free_rec) - 1) {
974 * We have a extent rec after index, so just use the e_cpos
977 *cpos_end = le32_to_cpu(el->l_recs[index+1].e_cpos);
1005 cpos = le32_to_cpu(eb->h_list.l_recs[index].e_cpos);
1062 int *index,
1077 ret_rec, index);
1135 ret_rec, index);
1151 int index)
1153 if ((rb->rf_records.rl_recs[index].r_refcount ==
1154 rb->rf_records.rl_recs[index + 1].r_refcount) &&
1155 (le64_to_cpu(rb->rf_records.rl_recs[index].r_cpos) +
1156 le32_to_cpu(rb->rf_records.rl_recs[index].r_clusters) ==
1157 le64_to_cpu(rb->rf_records.rl_recs[index + 1].r_cpos)))
1165 int index)
1169 if (index < le16_to_cpu(rb->rf_records.rl_used) - 1)
1170 ret = ocfs2_refcount_rec_adjacent(rb, index);
1172 if (index > 0) {
1175 tmp = ocfs2_refcount_rec_adjacent(rb, index - 1);
1189 int index)
1191 BUG_ON(rb->rf_records.rl_recs[index].r_refcount !=
1192 rb->rf_records.rl_recs[index+1].r_refcount);
1194 le32_add_cpu(&rb->rf_records.rl_recs[index].r_clusters,
1195 le32_to_cpu(rb->rf_records.rl_recs[index+1].r_clusters));
1197 if (index < le16_to_cpu(rb->rf_records.rl_used) - 2)
1198 memmove(&rb->rf_records.rl_recs[index + 1],
1199 &rb->rf_records.rl_recs[index + 2],
1201 (le16_to_cpu(rb->rf_records.rl_used) - index - 2));
1212 int index)
1215 ocfs2_refcount_rec_contig(rb, index);
1221 BUG_ON(index == 0);
1222 index--;
1225 ocfs2_rotate_refcount_rec_left(rb, index);
1228 ocfs2_rotate_refcount_rec_left(rb, index);
1232 * Change the refcount indexed by "index" in ref_bh.
1238 int index, int merge, int change)
1244 struct ocfs2_refcount_rec *rec = &rl->rl_recs[index];
1255 index, le32_to_cpu(rec->r_refcount), change);
1259 if (index != le16_to_cpu(rl->rl_used) - 1) {
1261 (le16_to_cpu(rl->rl_used) - index - 1) *
1269 ocfs2_refcount_rec_merge(rb, index);
1649 * Only called when we have inserted a new refcount rec at index 0
1741 int index, int merge,
1764 cpos, len, NULL, &index,
1783 if (index < le16_to_cpu(rf_list->rl_used))
1784 memmove(&rf_list->rl_recs[index + 1],
1785 &rf_list->rl_recs[index],
1786 (le16_to_cpu(rf_list->rl_used) - index) *
1790 (unsigned long long)ref_leaf_bh->b_blocknr, index,
1794 rf_list->rl_recs[index] = *rec;
1799 ocfs2_refcount_rec_merge(rb, index);
1803 if (index == 0) {
1816 * Split the refcount_rec indexed by "index" in ref_leaf_bh.
1829 int index, int merge,
1838 struct ocfs2_refcount_rec *orig_rec = &rf_list->rl_recs[index];
1894 cpos, len, &tmp_rec, &index,
1904 orig_rec = &rf_list->rl_recs[index];
1917 * after "index" to the end.
1919 if (index != le16_to_cpu(rf_list->rl_used) - 1)
1920 memmove(&rf_list->rl_recs[index + 1 + recs_need],
1921 &rf_list->rl_recs[index + 1],
1922 (le16_to_cpu(rf_list->rl_used) - index - 1) *
1935 tail_rec = &rf_list->rl_recs[index + recs_need];
1956 index++;
1962 rf_list->rl_recs[index] = *split_rec;
1964 (unsigned long long)ref_leaf_bh->b_blocknr, index,
1970 ocfs2_refcount_rec_merge(rb, index);
1987 int ret = 0, index;
1998 cpos, len, &rec, &index,
2023 ref_leaf_bh, index,
2037 &rec, index,
2055 &rec, index, merge,
2170 int index, u64 cpos, unsigned int len,
2177 struct ocfs2_refcount_rec *rec = &rb->rf_records.rl_recs[index];
2190 ref_leaf_bh, index, 1, -1);
2200 &split, index, 1,
2230 int ret = 0, index = 0;
2242 cpos, len, &rec, &index,
2258 ref_leaf_bh, index,
2378 int ret = 0, index, ref_blocks = 0, recs_add = 0;
2388 &index, &ref_leaf_bh);
2420 le32_to_cpu(rec.r_refcount), index);
2673 "index %d\n", inode->i_ino, i);
3062 int ret, index;
3095 index = ocfs2_search_extent_list(el, cpos);
3096 if (index == -1) {
3103 ret = ocfs2_split_extent(handle, et, path, index,
3209 int ret, delete, index, credits = 0;
3248 &rec, &index, &ref_leaf_bh);
3543 int ret = 0, index, ref_blocks = 0;
3564 &rec, &index,