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
323 ih = tp_item_head(&path); in _get_block_create_0()
324 if (is_indirect_le_ih(ih)) { in _get_block_create_0()
325 __le32 *ind_item = (__le32 *) ih_item_body(bh, ih); in _get_block_create_0()
337 ((ih_item_len(ih) / UNFM_P_SIZE) - 1)) { in _get_block_create_0()
385 copy_item_head(&tmp_ih, ih); in _get_block_create_0()
397 if (!is_direct_le_ih(ih)) { in _get_block_create_0()
406 if ((le_ih_k_offset(ih) + path.pos_in_item) > inode->i_size) in _get_block_create_0()
408 if ((le_ih_k_offset(ih) - 1 + ih_item_len(ih)) > inode->i_size) { in _get_block_create_0()
410 inode->i_size - (le_ih_k_offset(ih) - 1) - in _get_block_create_0()
414 chars = ih_item_len(ih) - path.pos_in_item; in _get_block_create_0()
416 memcpy(p, ih_item_body(bh, ih) + path.pos_in_item, chars); in _get_block_create_0()
439 ih = tp_item_head(&path); in _get_block_create_0()
659 struct item_head *ih, tmp_ih; in reiserfs_get_block() local
740 ih = tp_item_head(&path); in reiserfs_get_block()
745 copy_item_head(&tmp_ih, ih); in reiserfs_get_block()
748 (retval, allocated_block_nr, ih, item, pos_in_item)) { in reiserfs_get_block()
789 if (indirect_item_found(retval, ih)) { in reiserfs_get_block()
843 if (is_statdata_le_ih(ih)) { in reiserfs_get_block()
879 } else if (is_direct_le_ih(ih)) { in reiserfs_get_block()
884 ((le_ih_k_offset(ih) - in reiserfs_get_block()
1014 RFALSE(pos_in_item != ih_item_len(ih) / UNFM_P_SIZE, in reiserfs_get_block()
1023 &ih->ih_key) + in reiserfs_get_block()
1024 op_bytes_number(ih, in reiserfs_get_block()
1133 ih = tp_item_head(&path); in reiserfs_get_block()
1232 struct item_head *ih; in init_inode() local
1236 ih = tp_item_head(path); in init_inode()
1238 copy_key(INODE_PKEY(inode), &ih->ih_key); in init_inode()
1248 if (stat_data_v1(ih)) { in init_inode()
1250 (struct stat_data_v1 *)ih_item_body(bh, ih); in init_inode()
1307 struct stat_data *sd = (struct stat_data *)ih_item_body(bh, ih); in init_inode()
1416 struct item_head *ih; in update_stat_data() local
1419 ih = tp_item_head(path); in update_stat_data()
1421 if (!is_statdata_le_ih(ih)) in update_stat_data()
1423 INODE_PKEY(inode), ih); in update_stat_data()
1426 if (stat_data_v1(ih)) { in update_stat_data()
1427 inode2sd_v1(ih_item_body(bh, ih), inode, size); in update_stat_data()
1429 inode2sd(ih_item_body(bh, ih), inode, size); in update_stat_data()
1442 struct item_head *ih, tmp_ih; in reiserfs_update_sd_size() local
1482 ih = tp_item_head(&path); in reiserfs_update_sd_size()
1483 copy_item_head(&tmp_ih, ih); in reiserfs_update_sd_size()
1790 struct item_head *ih, struct treepath *path, in reiserfs_new_directory() argument
1801 _make_cpu_key(&key, KEY_FORMAT_3_5, le32_to_cpu(ih->ih_key.k_dir_id), in reiserfs_new_directory()
1802 le32_to_cpu(ih->ih_key.k_objectid), DOT_OFFSET, in reiserfs_new_directory()
1811 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, DOT_OFFSET, in reiserfs_new_directory()
1814 make_empty_dir_item_v1(body, ih->ih_key.k_dir_id, in reiserfs_new_directory()
1815 ih->ih_key.k_objectid, in reiserfs_new_directory()
1819 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, DOT_OFFSET, in reiserfs_new_directory()
1822 make_empty_dir_item(body, ih->ih_key.k_dir_id, in reiserfs_new_directory()
1823 ih->ih_key.k_objectid, in reiserfs_new_directory()
1839 &(ih->ih_key)); in reiserfs_new_directory()
1844 return reiserfs_insert_item(th, path, &key, ih, inode, body); in reiserfs_new_directory()
1853 struct item_head *ih, in reiserfs_new_symlink() argument
1864 le32_to_cpu(ih->ih_key.k_dir_id), in reiserfs_new_symlink()
1865 le32_to_cpu(ih->ih_key.k_objectid), in reiserfs_new_symlink()
1868 make_le_item_head(ih, NULL, KEY_FORMAT_3_5, 1, TYPE_DIRECT, item_len, in reiserfs_new_symlink()
1882 &(ih->ih_key)); in reiserfs_new_symlink()
1887 return reiserfs_insert_item(th, path, &key, ih, inode, symname); in reiserfs_new_symlink()
1922 struct item_head ih; in reiserfs_new_inode() local
1941 ih.ih_key.k_dir_id = reiserfs_choose_packing(dir); in reiserfs_new_inode()
1942 ih.ih_key.k_objectid = cpu_to_le32(reiserfs_get_unused_objectid(th)); in reiserfs_new_inode()
1943 if (!ih.ih_key.k_objectid) { in reiserfs_new_inode()
1947 args.objectid = inode->i_ino = le32_to_cpu(ih.ih_key.k_objectid); in reiserfs_new_inode()
1949 make_le_item_head(&ih, NULL, KEY_FORMAT_3_5, SD_OFFSET, in reiserfs_new_inode()
1952 make_le_item_head(&ih, NULL, KEY_FORMAT_3_6, SD_OFFSET, in reiserfs_new_inode()
1954 memcpy(INODE_PKEY(inode), &ih.ih_key, KEY_SIZE); in reiserfs_new_inode()
1955 args.dirid = le32_to_cpu(ih.ih_key.k_dir_id); in reiserfs_new_inode()
2006 _make_cpu_key(&key, KEY_FORMAT_3_6, le32_to_cpu(ih.ih_key.k_dir_id), in reiserfs_new_inode()
2007 le32_to_cpu(ih.ih_key.k_objectid), SD_OFFSET, in reiserfs_new_inode()
2052 reiserfs_insert_item(th, &path_to_key, &key, &ih, inode, in reiserfs_new_inode()
2066 reiserfs_new_directory(th, inode, &ih, &path_to_key, dir); in reiserfs_new_inode()
2074 reiserfs_new_symlink(th, inode, &ih, &path_to_key, symname, in reiserfs_new_inode()
2358 struct item_head *ih; in map_block_for_writepage() local
2395 ih = tp_item_head(&path); in map_block_for_writepage()
2400 if (indirect_item_found(retval, ih)) { in map_block_for_writepage()
2412 } else if (is_direct_le_ih(ih)) { in map_block_for_writepage()
2416 copy_size = ih_item_len(ih) - pos_in_item; in map_block_for_writepage()
2419 copy_item_head(&tmp_ih, ih); in map_block_for_writepage()
2444 memcpy(ih_item_body(bh, ih) + pos_in_item, p + bytes_copied, in map_block_for_writepage()