Lines Matching full:inode
51 struct ext4_dir_entry_2 *prev, u32 inode, const char *name,
70 dentry->inode = inode;
81 and stores the location of the structure in an inode. The new inode's
82 .. link is set to dir_inode_num. Stores the location of the inode number
83 of each directory entry into dentries[i].inode, to be filled in later
84 when the inode for the entry is allocated. Returns the inode number of the
89 struct ext4_inode *inode;
109 error("failed to allocate inode\n");
115 inode = get_inode(inode_num);
116 if (inode == NULL) {
117 error("failed to get inode %u", inode_num);
121 data = inode_allocate_data_extents(inode, len, len);
127 inode->i_mode = S_IFDIR;
128 inode->i_links_count = dirs + 2;
129 inode->i_flags |= aux_info.default_i_flags;
151 dentries[i].inode = &dentry->inode;
159 dentry->inode = 0;
167 /* Creates a file on disk. Returns the inode number of the new file */
170 struct ext4_inode *inode;
175 error("failed to allocate inode\n");
179 inode = get_inode(inode_num);
180 if (inode == NULL) {
181 error("failed to get inode %u", inode_num);
186 inode_allocate_file_extents(inode, len, filename);
188 inode->i_mode = S_IFREG;
189 inode->i_links_count = 1;
190 inode->i_flags |= aux_info.default_i_flags;
195 /* Creates a file on disk. Returns the inode number of the new file */
198 struct ext4_inode *inode;
204 error("failed to allocate inode\n");
208 inode = get_inode(inode_num);
209 if (inode == NULL) {
210 error("failed to get inode %u", inode_num);
214 inode->i_mode = S_IFLNK;
215 inode->i_links_count = 1;
216 inode->i_flags |= aux_info.default_i_flags;
217 inode->i_size_lo = len;
219 if (len + 1 <= sizeof(inode->i_block)) {
221 memcpy((char*)inode->i_block, link, len);
223 u8 *data = inode_allocate_data_indirect(inode, info.block_size, info.block_size);
225 inode->i_blocks_lo = info.block_size / 512;
233 struct ext4_inode *inode = get_inode(inode_num);
235 if (!inode)
238 inode->i_mode |= mode;
239 inode->i_uid = uid;
240 inode->i_gid = gid;
241 inode->i_mtime = mtime;
242 inode->i_atime = mtime;
243 inode->i_ctime = mtime;