Lines Matching refs:ih
136 inline void make_le_item_head(struct item_head *ih, const struct cpu_key *key, in make_le_item_head() argument
142 ih->ih_key.k_dir_id = cpu_to_le32(key->on_disk_key.k_dir_id); in make_le_item_head()
143 ih->ih_key.k_objectid = in make_le_item_head()
146 put_ih_version(ih, version); in make_le_item_head()
147 set_le_ih_k_offset(ih, offset); in make_le_item_head()
148 set_le_ih_k_type(ih, type); in make_le_item_head()
149 put_ih_item_len(ih, length); in make_le_item_head()
155 put_ih_entry_count(ih, entry_count); in make_le_item_head()
214 struct item_head *ih, in allocation_needed() argument
219 if (retval == POSITION_FOUND && is_indirect_le_ih(ih) && in allocation_needed()
225 static inline int indirect_item_found(int retval, struct item_head *ih) in indirect_item_found() argument
227 return (retval == POSITION_FOUND) && is_indirect_le_ih(ih); in indirect_item_found()
290 struct item_head *ih, tmp_ih; in _get_block_create_0() local
324 ih = tp_item_head(&path); in _get_block_create_0()
325 if (is_indirect_le_ih(ih)) { in _get_block_create_0()
326 __le32 *ind_item = (__le32 *) ih_item_body(bh, ih); in _get_block_create_0()
338 ((ih_item_len(ih) / UNFM_P_SIZE) - 1)) { in _get_block_create_0()
390 copy_item_head(&tmp_ih, ih); in _get_block_create_0()
404 if (!is_direct_le_ih(ih)) { in _get_block_create_0()
413 if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size) in _get_block_create_0()
415 if ((le_ih_k_offset(ih) - 1 + ih_item_len(ih)) > inode->i_size) { in _get_block_create_0()
417 inode->i_size - (le_ih_k_offset(ih) - 1) - in _get_block_create_0()
421 chars = ih_item_len(ih) - path.pos_in_item; in _get_block_create_0()
423 memcpy(p, ih_item_body(bh, ih) + path.pos_in_item, chars); in _get_block_create_0()
446 ih = tp_item_head(&path); in _get_block_create_0()
666 struct item_head *ih, tmp_ih; in reiserfs_get_block() local
747 ih = tp_item_head(&path); in reiserfs_get_block()
752 copy_item_head(&tmp_ih, ih); in reiserfs_get_block()
755 (retval, allocated_block_nr, ih, item, pos_in_item)) { in reiserfs_get_block()
796 if (indirect_item_found(retval, ih)) { in reiserfs_get_block()
850 if (is_statdata_le_ih(ih)) { in reiserfs_get_block()
886 } else if (is_direct_le_ih(ih)) { in reiserfs_get_block()
891 ((le_ih_k_offset(ih) - in reiserfs_get_block()
1021 RFALSE(pos_in_item != ih_item_len(ih) / UNFM_P_SIZE, in reiserfs_get_block()
1030 &ih->ih_key) + in reiserfs_get_block()
1031 op_bytes_number(ih, in reiserfs_get_block()
1139 ih = tp_item_head(&path); in reiserfs_get_block()
1240 struct item_head *ih; in init_inode() local
1244 ih = tp_item_head(path); in init_inode()
1246 copy_key(INODE_PKEY(inode), &ih->ih_key); in init_inode()
1256 if (stat_data_v1(ih)) { in init_inode()
1258 (struct stat_data_v1 *)ih_item_body(bh, ih); in init_inode()
1316 struct stat_data *sd = (struct stat_data *)ih_item_body(bh, ih); in init_inode()
1428 struct item_head *ih; in update_stat_data() local
1431 ih = tp_item_head(path); in update_stat_data()
1433 if (!is_statdata_le_ih(ih)) in update_stat_data()
1435 INODE_PKEY(inode), ih); in update_stat_data()
1438 if (stat_data_v1(ih)) { in update_stat_data()
1439 inode2sd_v1(ih_item_body(bh, ih), inode, size); in update_stat_data()
1441 inode2sd(ih_item_body(bh, ih), inode, size); in update_stat_data()
1454 struct item_head *ih, tmp_ih; in reiserfs_update_sd_size() local
1494 ih = tp_item_head(&path); in reiserfs_update_sd_size()
1495 copy_item_head(&tmp_ih, ih); in reiserfs_update_sd_size()
1806 struct item_head *ih, struct treepath *path, in reiserfs_new_directory() argument
1817 _make_cpu_key(&key, KEY_FORMAT_3_5, le32_to_cpu(ih->ih_key.k_dir_id), in reiserfs_new_directory()
1818 le32_to_cpu(ih->ih_key.k_objectid), DOT_OFFSET, in reiserfs_new_directory()
1827 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, DOT_OFFSET, in reiserfs_new_directory()
1830 make_empty_dir_item_v1(body, ih->ih_key.k_dir_id, in reiserfs_new_directory()
1831 ih->ih_key.k_objectid, in reiserfs_new_directory()
1835 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, DOT_OFFSET, in reiserfs_new_directory()
1838 make_empty_dir_item(body, ih->ih_key.k_dir_id, in reiserfs_new_directory()
1839 ih->ih_key.k_objectid, in reiserfs_new_directory()
1855 &(ih->ih_key)); in reiserfs_new_directory()
1860 return reiserfs_insert_item(th, path, &key, ih, inode, body); in reiserfs_new_directory()
1869 struct item_head *ih, in reiserfs_new_symlink() argument
1880 le32_to_cpu(ih->ih_key.k_dir_id), in reiserfs_new_symlink()
1881 le32_to_cpu(ih->ih_key.k_objectid), in reiserfs_new_symlink()
1884 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, 1, TYPE_DIRECT, item_len, in reiserfs_new_symlink()
1898 &(ih->ih_key)); in reiserfs_new_symlink()
1903 return reiserfs_insert_item(th, path, &key, ih, inode, symname); in reiserfs_new_symlink()
1938 struct item_head ih; in reiserfs_new_inode() local
1957 ih.ih_key.k_dir_id = reiserfs_choose_packing(dir); in reiserfs_new_inode()
1958 ih.ih_key.k_objectid = cpu_to_le32(reiserfs_get_unused_objectid(th)); in reiserfs_new_inode()
1959 if (!ih.ih_key.k_objectid) { in reiserfs_new_inode()
1963 args.objectid = inode->i_ino = le32_to_cpu(ih.ih_key.k_objectid); in reiserfs_new_inode()
1965 make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET, in reiserfs_new_inode()
1968 make_le_item_head(&ih, NULL, KEY_FORMAT_3_6, SD_OFFSET, in reiserfs_new_inode()
1970 memcpy(INODE_PKEY(inode), &ih.ih_key, KEY_SIZE); in reiserfs_new_inode()
1971 args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); in reiserfs_new_inode()
2026 _make_cpu_key(&key, KEY_FORMAT_3_6, le32_to_cpu(ih.ih_key.k_dir_id), in reiserfs_new_inode()
2027 le32_to_cpu(ih.ih_key.k_objectid), SD_OFFSET, in reiserfs_new_inode()
2072 reiserfs_insert_item(th, &path_to_key, &key, &ih, inode, in reiserfs_new_inode()
2086 reiserfs_new_directory(th, inode, &ih, &path_to_key, dir); in reiserfs_new_inode()
2094 reiserfs_new_symlink(th, inode, &ih, &path_to_key, symname, in reiserfs_new_inode()
2371 struct item_head *ih; in map_block_for_writepage() local
2408 ih = tp_item_head(&path); in map_block_for_writepage()
2413 if (indirect_item_found(retval, ih)) { in map_block_for_writepage()
2425 } else if (is_direct_le_ih(ih)) { in map_block_for_writepage()
2429 copy_size = ih_item_len(ih) - pos_in_item; in map_block_for_writepage()
2432 copy_item_head(&tmp_ih, ih); in map_block_for_writepage()
2457 memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied, in map_block_for_writepage()