Lines Matching refs:ih

137 inline void make_le_item_head(struct item_head *ih, const struct cpu_key *key,
143 ih->ih_key.k_dir_id = cpu_to_le32(key->on_disk_key.k_dir_id);
144 ih->ih_key.k_objectid =
147 put_ih_version(ih, version);
148 set_le_ih_k_offset(ih, offset);
149 set_le_ih_k_type(ih, type);
150 put_ih_item_len(ih, length);
151 /* set_ih_free_space (ih, 0); */
156 put_ih_entry_count(ih, entry_count);
215 struct item_head *ih,
220 if (retval == POSITION_FOUND && is_indirect_le_ih(ih) &&
226 static inline int indirect_item_found(int retval, struct item_head *ih)
228 return (retval == POSITION_FOUND) && is_indirect_le_ih(ih);
291 struct item_head *ih, tmp_ih;
323 ih = tp_item_head(&path);
324 if (is_indirect_le_ih(ih)) {
325 __le32 *ind_item = (__le32 *) ih_item_body(bh, ih);
337 ((ih_item_len(ih) / UNFM_P_SIZE) - 1)) {
385 copy_item_head(&tmp_ih, ih);
397 if (!is_direct_le_ih(ih)) {
406 if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size)
408 if ((le_ih_k_offset(ih) - 1 + ih_item_len(ih)) > inode->i_size) {
410 inode->i_size - (le_ih_k_offset(ih) - 1) -
414 chars = ih_item_len(ih) - path.pos_in_item;
416 memcpy(p, ih_item_body(bh, ih) + path.pos_in_item, chars);
439 ih = tp_item_head(&path);
659 struct item_head *ih, tmp_ih;
740 ih = tp_item_head(&path);
745 copy_item_head(&tmp_ih, ih);
748 (retval, allocated_block_nr, ih, item, pos_in_item)) {
789 if (indirect_item_found(retval, ih)) {
843 if (is_statdata_le_ih(ih)) {
879 } else if (is_direct_le_ih(ih)) {
884 ((le_ih_k_offset(ih) -
1014 RFALSE(pos_in_item != ih_item_len(ih) / UNFM_P_SIZE,
1023 &ih->ih_key) +
1024 op_bytes_number(ih,
1133 ih = tp_item_head(&path);
1232 struct item_head *ih;
1236 ih = tp_item_head(path);
1238 copy_key(INODE_PKEY(inode), &ih->ih_key);
1248 if (stat_data_v1(ih)) {
1250 (struct stat_data_v1 *)ih_item_body(bh, ih);
1305 struct stat_data *sd = (struct stat_data *)ih_item_body(bh, ih);
1412 struct item_head *ih;
1415 ih = tp_item_head(path);
1417 if (!is_statdata_le_ih(ih))
1419 INODE_PKEY(inode), ih);
1422 if (stat_data_v1(ih)) {
1423 inode2sd_v1(ih_item_body(bh, ih), inode, size);
1425 inode2sd(ih_item_body(bh, ih), inode, size);
1438 struct item_head *ih, tmp_ih;
1478 ih = tp_item_head(&path);
1479 copy_item_head(&tmp_ih, ih);
1786 struct item_head *ih, struct treepath *path,
1797 _make_cpu_key(&key, KEY_FORMAT_3_5, le32_to_cpu(ih->ih_key.k_dir_id),
1798 le32_to_cpu(ih->ih_key.k_objectid), DOT_OFFSET,
1807 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, DOT_OFFSET,
1810 make_empty_dir_item_v1(body, ih->ih_key.k_dir_id,
1811 ih->ih_key.k_objectid,
1815 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, DOT_OFFSET,
1818 make_empty_dir_item(body, ih->ih_key.k_dir_id,
1819 ih->ih_key.k_objectid,
1835 &(ih->ih_key));
1840 return reiserfs_insert_item(th, path, &key, ih, inode, body);
1849 struct item_head *ih,
1860 le32_to_cpu(ih->ih_key.k_dir_id),
1861 le32_to_cpu(ih->ih_key.k_objectid),
1864 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, 1, TYPE_DIRECT, item_len,
1878 &(ih->ih_key));
1883 return reiserfs_insert_item(th, path, &key, ih, inode, symname);
1918 struct item_head ih;
1937 ih.ih_key.k_dir_id = reiserfs_choose_packing(dir);
1938 ih.ih_key.k_objectid = cpu_to_le32(reiserfs_get_unused_objectid(th));
1939 if (!ih.ih_key.k_objectid) {
1943 args.objectid = inode->i_ino = le32_to_cpu(ih.ih_key.k_objectid);
1945 make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET,
1948 make_le_item_head(&ih, NULL, KEY_FORMAT_3_6, SD_OFFSET,
1950 memcpy(INODE_PKEY(inode), &ih.ih_key, KEY_SIZE);
1951 args.dirid = le32_to_cpu(ih.ih_key.k_dir_id);
2002 _make_cpu_key(&key, KEY_FORMAT_3_6, le32_to_cpu(ih.ih_key.k_dir_id),
2003 le32_to_cpu(ih.ih_key.k_objectid), SD_OFFSET,
2048 reiserfs_insert_item(th, &path_to_key, &key, &ih, inode,
2062 reiserfs_new_directory(th, inode, &ih, &path_to_key, dir);
2070 reiserfs_new_symlink(th, inode, &ih, &path_to_key, symname,
2354 struct item_head *ih;
2391 ih = tp_item_head(&path);
2396 if (indirect_item_found(retval, ih)) {
2408 } else if (is_direct_le_ih(ih)) {
2412 copy_size = ih_item_len(ih) - pos_in_item;
2415 copy_item_head(&tmp_ih, ih);
2440 memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied,