Lines Matching refs:inode

64 		struct ext4_dir_entry_2 *prev, u32 inode, const char *name,
83 dentry->inode = inode;
94 and stores the location of the structure in an inode. The new inode's
95 .. link is set to dir_inode_num. Stores the location of the inode number
96 of each directory entry into dentries[i].inode, to be filled in later
97 when the inode for the entry is allocated. Returns the inode number of the
102 struct ext4_inode *inode;
122 error("failed to allocate inode\n");
128 inode = get_inode(inode_num);
129 if (inode == NULL) {
130 error("failed to get inode %u", inode_num);
134 data = inode_allocate_data_extents(inode, len, len);
140 inode->i_mode = S_IFDIR;
141 inode->i_links_count = dirs + 2;
142 inode->i_flags |= aux_info.default_i_flags;
164 dentries[i].inode = &dentry->inode;
177 /* Creates a file on disk. Returns the inode number of the new file */
180 struct ext4_inode *inode;
185 error("failed to allocate inode\n");
189 inode = get_inode(inode_num);
190 if (inode == NULL) {
191 error("failed to get inode %u", inode_num);
196 struct block_allocation* alloc = inode_allocate_file_extents(inode, len, filename);
204 inode->i_mode = S_IFREG;
205 inode->i_links_count = 1;
206 inode->i_flags |= aux_info.default_i_flags;
211 /* Creates a file on disk. Returns the inode number of the new file */
214 struct ext4_inode *inode;
220 error("failed to allocate inode\n");
224 inode = get_inode(inode_num);
225 if (inode == NULL) {
226 error("failed to get inode %u", inode_num);
230 inode->i_mode = S_IFLNK;
231 inode->i_links_count = 1;
232 inode->i_flags |= aux_info.default_i_flags;
233 inode->i_size_lo = len;
235 if (len + 1 <= sizeof(inode->i_block)) {
237 memcpy((char*)inode->i_block, link, len);
239 u8 *data = inode_allocate_data_indirect(inode, info.block_size, info.block_size);
241 inode->i_blocks_lo = info.block_size / 512;
249 struct ext4_inode *inode = get_inode(inode_num);
251 if (!inode)
254 inode->i_mode |= mode;
255 inode->i_uid = uid;
256 inode->i_gid = gid;
257 inode->i_mtime = mtime;
258 inode->i_atime = mtime;
259 inode->i_ctime = mtime;
299 * they're not stored in the inode. The kernel ext4 code uses the following
408 static int xattr_addto_inode(struct ext4_inode *inode, int name_index,
411 struct ext4_xattr_ibody_header *hdr = (struct ext4_xattr_ibody_header *) (inode + 1);
413 char *block_end = ((char *) inode) + info.inode_size;
422 inode->i_extra_isize = cpu_to_le16(sizeof(struct ext4_inode) - EXT4_GOOD_OLD_INODE_SIZE);
427 static int xattr_addto_block(struct ext4_inode *inode, int name_index,
430 struct ext4_xattr_header *header = get_xattr_block_for_inode(inode);
454 struct ext4_inode *inode = get_inode(inode_num);
456 if (!inode)
459 int result = xattr_addto_inode(inode, name_index, name, value, value_len);
461 result = xattr_addto_block(inode, name_index, name, value, value_len);