• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/reiserfs/

Lines Matching defs:ih

33 	struct item_head *ih;
38 ih = B_N_PITEM_HEAD(source, item_num);
40 RFALSE(!is_direntry_le_ih(ih), "vs-10000: item must be directory item");
43 deh = B_I_DEH(source, ih);
46 ih_item_len(ih)) -
49 source->b_data + ih_location(ih) +
64 (last_first == FIRST_TO_LAST && le_ih_k_offset(ih) == DOT_OFFSET) ||
66 && comp_short_le_keys /*COMP_SHORT_KEYS */ (&ih->ih_key,
74 memcpy(&new_ih.ih_key, &ih->ih_key, KEY_SIZE);
83 if (from < I_ENTRY_COUNT(ih)) {
132 struct item_head *ih;
141 ih = B_N_PITEM_HEAD(src, 0);
144 || (!op_is_left_mergeable(&(ih->ih_key), src->b_size)))
148 RFALSE(!ih_item_len(ih),
151 if (is_direntry_le_ih(ih)) {
154 bytes_or_entries = ih_entry_count(ih);
164 bytes_or_entries = ih_item_len(ih);
168 if (bytes_or_entries == ih_item_len(ih)
169 && is_indirect_le_ih(ih))
170 if (get_ih_free_space(ih))
175 "entirely (%h)", ih);
183 bytes_or_entries, B_I_PITEM(src, ih), 0);
188 ih);
189 if (bytes_or_entries == ih_item_len(ih))
190 set_ih_free_space(dih, get_ih_free_space(ih));
202 ih = B_N_PITEM_HEAD(src, src_nr_item - 1);
208 if (is_direntry_le_ih(ih)) {
211 bytes_or_entries = ih_entry_count(ih);
215 ih_entry_count(ih) - bytes_or_entries,
225 RFALSE(is_indirect_le_ih(ih) && get_ih_free_space(ih),
227 ih);
231 bytes_or_entries = ih_item_len(ih);
234 le_ih_k_offset(ih) + op_bytes_number(ih, src->b_size),
235 "vs-10050: items %h and %h do not match", ih, dih);
238 set_le_ih_k_offset(dih, le_ih_k_offset(ih));
242 set_le_ih_k_type(dih, le_ih_k_type(ih));
245 RFALSE(ih_item_len(ih) <= bytes_or_entries,
247 (unsigned long)ih_item_len(ih),
274 ih) + ih_item_len(ih) - bytes_or_entries,
293 struct item_head *ih;
318 ih = B_N_PITEM_HEAD(dest, dest_before);
325 memmove(ih + cpy_num, ih, (nr - dest_before) * IH_SIZE);
328 memcpy(ih, B_N_PITEM_HEAD(src, first), cpy_num * IH_SIZE);
334 j = location = (dest_before == 0) ? dest->b_size : ih_location(ih - 1);
336 location -= ih_item_len(ih + i - dest_before);
337 put_ih_location(ih + i - dest_before, location);
341 last_loc = ih_location(&(ih[nr + cpy_num - 1 - dest_before]));
342 last_inserted_loc = ih_location(&(ih[cpy_num - 1]));
386 struct item_head *ih;
393 ih = B_N_PITEM_HEAD(src, item_num);
394 if (is_direntry_le_ih(ih))
404 memcpy(&n_ih, ih, IH_SIZE);
406 if (is_indirect_le_ih(ih)) {
407 RFALSE(cpy_bytes == ih_item_len(ih)
408 && get_ih_free_space(ih),
410 (long unsigned)get_ih_free_space(ih));
414 RFALSE(op_is_left_mergeable(&(ih->ih_key), src->b_size),
415 "vs-10190: bad mergeability of item %h", ih);
416 n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */
422 ih = B_N_PITEM_HEAD(src, item_num);
423 if (is_direntry_le_ih(ih))
426 I_ENTRY_COUNT(ih) - cpy_bytes,
435 memcpy(&n_ih, ih, SHORT_KEY_SIZE);
437 n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */
439 if (is_direct_le_ih(ih)) {
441 le_ih_k_offset(ih) +
442 ih_item_len(ih) - cpy_bytes);
447 RFALSE(!cpy_bytes && get_ih_free_space(ih),
448 "vs-10200: ih->ih_free_space must be 0 when indirect item will be appended");
450 le_ih_k_offset(ih) +
451 (ih_item_len(ih) -
455 set_ih_free_space(&n_ih, get_ih_free_space(ih));
461 n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */
466 ih_item_len(ih) - cpy_bytes, 0);
772 struct item_head *ih;
779 ih = B_N_PITEM_HEAD(bh, B_NR_ITEMS(bh) - 1);
780 if (is_direntry_le_ih(ih))
783 len = ih_entry_count(ih);
786 len = ih_item_len(ih);
805 struct item_head *ih;
823 ih = B_N_PITEM_HEAD(bh, before);
826 last_loc = nr ? ih_location(&(ih[nr - before - 1])) : bh->b_size;
827 unmoved_loc = before ? ih_location(ih - 1) : bh->b_size;
844 memmove(ih + 1, ih, IH_SIZE * (nr - before));
845 memmove(ih, inserted_item_ih, IH_SIZE);
849 unmoved_loc -= ih_item_len(&(ih[i - before]));
850 put_ih_location(&(ih[i - before]), unmoved_loc);
879 struct item_head *ih;
905 ih = B_N_PITEM_HEAD(bh, affected_item_num);
907 last_loc = ih_location(&(ih[nr - affected_item_num - 1]));
908 unmoved_loc = affected_item_num ? ih_location(ih - 1) : bh->b_size;
916 put_ih_location(&(ih[i - affected_item_num]),
917 ih_location(&(ih[i - affected_item_num])) -
921 if (!is_direntry_le_ih(ih)) {
924 memmove(bh->b_data + ih_location(ih) +
926 bh->b_data + ih_location(ih),
927 ih_item_len(ih));
929 memset(bh->b_data + ih_location(ih), 0,
931 memcpy(bh->b_data + ih_location(ih) +
945 put_ih_item_len(ih, ih_item_len(ih) + paste_size);
965 struct item_head *ih, int from, int del_count)
976 RFALSE(!is_direntry_le_ih(ih), "10180: item is not directory item");
977 RFALSE(I_ENTRY_COUNT(ih) < from + del_count,
979 I_ENTRY_COUNT(ih), from, del_count);
985 item = bh->b_data + ih_location(ih);
988 deh = B_I_DEH(bh, ih);
993 (from ? deh_location(&(deh[from - 1])) : ih_item_len(ih));
999 for (i = I_ENTRY_COUNT(ih) - 1; i > from + del_count - 1; i--)
1009 put_ih_entry_count(ih, ih_entry_count(ih) - del_count);
1019 prev_record, item + ih_item_len(ih) - prev_record);
1038 struct item_head *ih;
1046 ih = B_N_PITEM_HEAD(bh, cut_item_num);
1048 if (is_direntry_le_ih(ih)) {
1050 cut_size = leaf_cut_entries(bh, ih, pos_in_item, cut_size);
1057 set_le_ih_k_offset(ih, deh_offset(B_I_DEH(bh, ih)));
1058 /*memcpy (&ih->ih_key.k_offset, &(B_I_DEH (bh, ih)->deh_offset), SHORT_KEY_SIZE); */
1062 RFALSE(is_statdata_le_ih(ih), "10195: item is stat data");
1063 RFALSE(pos_in_item && pos_in_item + cut_size != ih_item_len(ih),
1066 (long unsigned)ih_item_len(ih));
1070 memmove(bh->b_data + ih_location(ih),
1071 bh->b_data + ih_location(ih) + cut_size,
1072 ih_item_len(ih) - cut_size);
1075 if (is_direct_le_ih(ih))
1076 set_le_ih_k_offset(ih,
1077 le_ih_k_offset(ih) +
1080 set_le_ih_k_offset(ih,
1081 le_ih_k_offset(ih) +
1084 RFALSE(ih_item_len(ih) == cut_size
1085 && get_ih_free_space(ih),
1086 "10205: invalid ih_free_space (%h)", ih);
1092 last_loc = ih_location(&(ih[nr - cut_item_num - 1]));
1095 unmoved_loc = cut_item_num ? ih_location(ih - 1) : bh->b_size;
1102 put_ih_item_len(ih, ih_item_len(ih) - cut_size);
1104 if (is_indirect_le_ih(ih)) {
1106 set_ih_free_space(ih, 0);
1111 put_ih_location(&(ih[i - cut_item_num]),
1112 ih_location(&ih[i - cut_item_num]) + cut_size);
1136 struct item_head *ih;
1159 ih = B_N_PITEM_HEAD(bh, first);
1162 j = (first == 0) ? bh->b_size : ih_location(ih - 1);
1165 last_loc = ih_location(&(ih[nr - 1 - first]));
1166 last_removed_loc = ih_location(&(ih[del_num - 1]));
1172 memmove(ih, ih + del_num, (nr - first - del_num) * IH_SIZE);
1176 put_ih_location(&(ih[i - first]),
1177 ih_location(&(ih[i - first])) + (j -
1206 struct item_head *ih;
1216 ih = B_N_PITEM_HEAD(bh, item_num);
1219 RFALSE(!is_direntry_le_ih(ih), "10225: item is not directory item");
1220 RFALSE(I_ENTRY_COUNT(ih) < before,
1222 I_ENTRY_COUNT(ih), before);
1225 item = bh->b_data + ih_location(ih);
1228 deh = B_I_DEH(bh, ih);
1234 : (ih_item_len(ih) - paste_size));
1237 for (i = I_ENTRY_COUNT(ih) - 1; i >= before; i--)
1247 old_entry_num = I_ENTRY_COUNT(ih);
1248 put_ih_entry_count(ih, ih_entry_count(ih) + new_entry_count);
1252 item + (ih_item_len(ih) - paste_size) - insert_point);
1279 set_le_ih_k_offset(ih, deh_offset(new_dehs));
1280 /* memcpy (&ih->ih_key.k_offset,
1287 deh = B_I_DEH(bh, ih);
1288 for (i = 0; i < I_ENTRY_COUNT(ih); i++) {
1291 I_ENTRY_COUNT(ih) -
1300 ih, deh + i - 1, i, deh + i);
1306 ih, i, deh + i, deh + i + 1);