• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/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))
174 ih);
182 bytes_or_entries, B_I_PITEM(src, ih), 0);
187 ih);
188 if (bytes_or_entries == ih_item_len(ih))
189 set_ih_free_space(dih, get_ih_free_space(ih));
201 ih = B_N_PITEM_HEAD(src, src_nr_item - 1);
207 if (is_direntry_le_ih(ih)) {
210 bytes_or_entries = ih_entry_count(ih);
214 ih_entry_count(ih) - bytes_or_entries,
224 RFALSE(is_indirect_le_ih(ih) && get_ih_free_space(ih),
226 ih);
230 bytes_or_entries = ih_item_len(ih);
233 le_ih_k_offset(ih) + op_bytes_number(ih, src->b_size),
234 "vs-10050: items %h and %h do not match", ih, dih);
237 set_le_ih_k_offset(dih, le_ih_k_offset(ih));
241 set_le_ih_k_type(dih, le_ih_k_type(ih));
244 RFALSE(ih_item_len(ih) <= bytes_or_entries,
246 (unsigned long)ih_item_len(ih),
273 ih) + ih_item_len(ih) - bytes_or_entries,
292 struct item_head *ih;
317 ih = B_N_PITEM_HEAD(dest, dest_before);
324 memmove(ih + cpy_num, ih, (nr - dest_before) * IH_SIZE);
327 memcpy(ih, B_N_PITEM_HEAD(src, first), cpy_num * IH_SIZE);
333 j = location = (dest_before == 0) ? dest->b_size : ih_location(ih - 1);
335 location -= ih_item_len(ih + i - dest_before);
336 put_ih_location(ih + i - dest_before, location);
340 last_loc = ih_location(&(ih[nr + cpy_num - 1 - dest_before]));
341 last_inserted_loc = ih_location(&(ih[cpy_num - 1]));
385 struct item_head *ih;
392 if (is_direntry_le_ih(ih = B_N_PITEM_HEAD(src, item_num)))
402 memcpy(&n_ih, ih, IH_SIZE);
404 if (is_indirect_le_ih(ih)) {
405 RFALSE(cpy_bytes == ih_item_len(ih)
406 && get_ih_free_space(ih),
408 (long unsigned)get_ih_free_space(ih));
412 RFALSE(op_is_left_mergeable(&(ih->ih_key), src->b_size),
413 "vs-10190: bad mergeability of item %h", ih);
414 n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */
420 if (is_direntry_le_ih(ih = B_N_PITEM_HEAD(src, item_num)))
423 I_ENTRY_COUNT(ih) - cpy_bytes,
432 memcpy(&n_ih, ih, SHORT_KEY_SIZE);
434 n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */
436 if (is_direct_le_ih(ih)) {
438 le_ih_k_offset(ih) +
439 ih_item_len(ih) - cpy_bytes);
444 RFALSE(!cpy_bytes && get_ih_free_space(ih),
445 "vs-10200: ih->ih_free_space must be 0 when indirect item will be appended");
447 le_ih_k_offset(ih) +
448 (ih_item_len(ih) -
452 set_ih_free_space(&n_ih, get_ih_free_space(ih));
458 n_ih.ih_version = ih->ih_version; /* JDM Endian safe, both le */
463 ih_item_len(ih) - cpy_bytes, 0);
770 struct item_head *ih;
778 (ih = B_N_PITEM_HEAD(bh, B_NR_ITEMS(bh) - 1)))
781 len = ih_entry_count(ih);
784 len = ih_item_len(ih);
803 struct item_head *ih;
821 ih = B_N_PITEM_HEAD(bh, before);
824 last_loc = nr ? ih_location(&(ih[nr - before - 1])) : bh->b_size;
825 unmoved_loc = before ? ih_location(ih - 1) : bh->b_size;
842 memmove(ih + 1, ih, IH_SIZE * (nr - before));
843 memmove(ih, inserted_item_ih, IH_SIZE);
847 unmoved_loc -= ih_item_len(&(ih[i - before]));
848 put_ih_location(&(ih[i - before]), unmoved_loc);
877 struct item_head *ih;
900 ih = B_N_PITEM_HEAD(bh, affected_item_num);
902 last_loc = ih_location(&(ih[nr - affected_item_num - 1]));
903 unmoved_loc = affected_item_num ? ih_location(ih - 1) : bh->b_size;
911 put_ih_location(&(ih[i - affected_item_num]),
912 ih_location(&(ih[i - affected_item_num])) -
916 if (!is_direntry_le_ih(ih)) {
919 memmove(bh->b_data + ih_location(ih) +
921 bh->b_data + ih_location(ih),
922 ih_item_len(ih));
924 memset(bh->b_data + ih_location(ih), 0,
926 memcpy(bh->b_data + ih_location(ih) +
940 put_ih_item_len(ih, ih_item_len(ih) + paste_size);
960 struct item_head *ih, int from, int del_count)
971 RFALSE(!is_direntry_le_ih(ih), "10180: item is not directory item");
972 RFALSE(I_ENTRY_COUNT(ih) < from + del_count,
974 I_ENTRY_COUNT(ih), from, del_count);
980 item = bh->b_data + ih_location(ih);
983 deh = B_I_DEH(bh, ih);
988 (from ? deh_location(&(deh[from - 1])) : ih_item_len(ih));
994 for (i = I_ENTRY_COUNT(ih) - 1; i > from + del_count - 1; i--)
1004 put_ih_entry_count(ih, ih_entry_count(ih) - del_count);
1014 prev_record, item + ih_item_len(ih) - prev_record);
1033 struct item_head *ih;
1041 ih = B_N_PITEM_HEAD(bh, cut_item_num);
1043 if (is_direntry_le_ih(ih)) {
1045 cut_size = leaf_cut_entries(bh, ih, pos_in_item, cut_size);
1052 set_le_ih_k_offset(ih, deh_offset(B_I_DEH(bh, ih)));
1053 /*memcpy (&ih->ih_key.k_offset, &(B_I_DEH (bh, ih)->deh_offset), SHORT_KEY_SIZE); */
1057 RFALSE(is_statdata_le_ih(ih), "10195: item is stat data");
1058 RFALSE(pos_in_item && pos_in_item + cut_size != ih_item_len(ih),
1061 (long unsigned)ih_item_len(ih));
1065 memmove(bh->b_data + ih_location(ih),
1066 bh->b_data + ih_location(ih) + cut_size,
1067 ih_item_len(ih) - cut_size);
1070 if (is_direct_le_ih(ih))
1071 set_le_ih_k_offset(ih,
1072 le_ih_k_offset(ih) +
1075 set_le_ih_k_offset(ih,
1076 le_ih_k_offset(ih) +
1079 RFALSE(ih_item_len(ih) == cut_size
1080 && get_ih_free_space(ih),
1081 "10205: invalid ih_free_space (%h)", ih);
1087 last_loc = ih_location(&(ih[nr - cut_item_num - 1]));
1090 unmoved_loc = cut_item_num ? ih_location(ih - 1) : bh->b_size;
1097 put_ih_item_len(ih, ih_item_len(ih) - cut_size);
1099 if (is_indirect_le_ih(ih)) {
1101 set_ih_free_space(ih, 0);
1106 put_ih_location(&(ih[i - cut_item_num]),
1107 ih_location(&ih[i - cut_item_num]) + cut_size);
1131 struct item_head *ih;
1154 ih = B_N_PITEM_HEAD(bh, first);
1157 j = (first == 0) ? bh->b_size : ih_location(ih - 1);
1160 last_loc = ih_location(&(ih[nr - 1 - first]));
1161 last_removed_loc = ih_location(&(ih[del_num - 1]));
1167 memmove(ih, ih + del_num, (nr - first - del_num) * IH_SIZE);
1171 put_ih_location(&(ih[i - first]),
1172 ih_location(&(ih[i - first])) + (j -
1201 struct item_head *ih;
1210 ih = B_N_PITEM_HEAD(bh, item_num);
1213 RFALSE(!is_direntry_le_ih(ih), "10225: item is not directory item");
1214 RFALSE(I_ENTRY_COUNT(ih) < before,
1216 I_ENTRY_COUNT(ih), before);
1219 item = bh->b_data + ih_location(ih);
1222 deh = B_I_DEH(bh, ih);
1228 : (ih_item_len(ih) - paste_size));
1231 for (i = I_ENTRY_COUNT(ih) - 1; i >= before; i--)
1241 old_entry_num = I_ENTRY_COUNT(ih);
1242 put_ih_entry_count(ih, ih_entry_count(ih) + new_entry_count);
1246 item + (ih_item_len(ih) - paste_size) - insert_point);
1273 set_le_ih_k_offset(ih, deh_offset(new_dehs));
1274 /* memcpy (&ih->ih_key.k_offset,
1281 deh = B_I_DEH(bh, ih);
1282 for (i = 0; i < I_ENTRY_COUNT(ih); i++) {
1285 I_ENTRY_COUNT(ih) -
1292 ih, deh + i - 1, i, deh + i);
1296 ih, i, deh + i, deh + i + 1);