Lines Matching refs:ih

137 inline void make_le_item_head(struct item_head *ih, const struct cpu_key *key,  in make_le_item_head()  argument
143 ih->ih_key.k_dir_id = cpu_to_le32(key->on_disk_key.k_dir_id); in make_le_item_head()
144 ih->ih_key.k_objectid = in make_le_item_head()
147 put_ih_version(ih, version); in make_le_item_head()
148 set_le_ih_k_offset(ih, offset); in make_le_item_head()
149 set_le_ih_k_type(ih, type); in make_le_item_head()
150 put_ih_item_len(ih, length); in make_le_item_head()
156 put_ih_entry_count(ih, entry_count); in make_le_item_head()
215 struct item_head *ih, in allocation_needed() argument
220 if (retval == POSITION_FOUND && is_indirect_le_ih(ih) && in allocation_needed()
226 static inline int indirect_item_found(int retval, struct item_head *ih) in indirect_item_found() argument
228 return (retval == POSITION_FOUND) && is_indirect_le_ih(ih); in indirect_item_found()
291 struct item_head *ih, tmp_ih; in _get_block_create_0() local
325 ih = tp_item_head(&path); in _get_block_create_0()
326 if (is_indirect_le_ih(ih)) { in _get_block_create_0()
327 __le32 *ind_item = (__le32 *) ih_item_body(bh, ih); in _get_block_create_0()
339 ((ih_item_len(ih) / UNFM_P_SIZE) - 1)) { in _get_block_create_0()
391 copy_item_head(&tmp_ih, ih); in _get_block_create_0()
405 if (!is_direct_le_ih(ih)) { in _get_block_create_0()
414 if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size) in _get_block_create_0()
416 if ((le_ih_k_offset(ih) - 1 + ih_item_len(ih)) > inode->i_size) { in _get_block_create_0()
418 inode->i_size - (le_ih_k_offset(ih) - 1) - in _get_block_create_0()
422 chars = ih_item_len(ih) - path.pos_in_item; in _get_block_create_0()
424 memcpy(p, ih_item_body(bh, ih) + path.pos_in_item, chars); in _get_block_create_0()
447 ih = tp_item_head(&path); in _get_block_create_0()
667 struct item_head *ih, tmp_ih; in reiserfs_get_block() local
748 ih = tp_item_head(&path); in reiserfs_get_block()
753 copy_item_head(&tmp_ih, ih); in reiserfs_get_block()
756 (retval, allocated_block_nr, ih, item, pos_in_item)) { in reiserfs_get_block()
797 if (indirect_item_found(retval, ih)) { in reiserfs_get_block()
851 if (is_statdata_le_ih(ih)) { in reiserfs_get_block()
887 } else if (is_direct_le_ih(ih)) { in reiserfs_get_block()
892 ((le_ih_k_offset(ih) - in reiserfs_get_block()
1022 RFALSE(pos_in_item != ih_item_len(ih) / UNFM_P_SIZE, in reiserfs_get_block()
1031 &ih->ih_key) + in reiserfs_get_block()
1032 op_bytes_number(ih, in reiserfs_get_block()
1141 ih = tp_item_head(&path); in reiserfs_get_block()
1242 struct item_head *ih; in init_inode() local
1246 ih = tp_item_head(path); in init_inode()
1248 copy_key(INODE_PKEY(inode), &ih->ih_key); in init_inode()
1258 if (stat_data_v1(ih)) { in init_inode()
1260 (struct stat_data_v1 *)ih_item_body(bh, ih); in init_inode()
1318 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()
2022 _make_cpu_key(&key, KEY_FORMAT_3_6, le32_to_cpu(ih.ih_key.k_dir_id), in reiserfs_new_inode()
2023 le32_to_cpu(ih.ih_key.k_objectid), SD_OFFSET, in reiserfs_new_inode()
2068 reiserfs_insert_item(th, &path_to_key, &key, &ih, inode, in reiserfs_new_inode()
2082 reiserfs_new_directory(th, inode, &ih, &path_to_key, dir); in reiserfs_new_inode()
2090 reiserfs_new_symlink(th, inode, &ih, &path_to_key, symname, in reiserfs_new_inode()
2367 struct item_head *ih; in map_block_for_writepage() local
2404 ih = tp_item_head(&path); in map_block_for_writepage()
2409 if (indirect_item_found(retval, ih)) { in map_block_for_writepage()
2421 } else if (is_direct_le_ih(ih)) { in map_block_for_writepage()
2425 copy_size = ih_item_len(ih) - pos_in_item; in map_block_for_writepage()
2428 copy_item_head(&tmp_ih, ih); in map_block_for_writepage()
2453 memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied, in map_block_for_writepage()