Lines Matching defs:inode

166 /* Given an allocation, attach as many blocks as possible to direct inode
168 static int inode_attach_direct_blocks(struct ext4_inode *inode,
175 inode->i_block[i] = get_block(alloc, i);
191 static int inode_attach_indirect_blocks(struct ext4_inode *inode,
197 inode->i_block[EXT4_IND_BLOCK] = ind_block;
223 static int inode_attach_dindirect_blocks(struct ext4_inode *inode,
229 inode->i_block[EXT4_DIND_BLOCK] = dind_block;
255 static int inode_attach_tindirect_blocks(struct ext4_inode *inode,
261 inode->i_block[EXT4_TIND_BLOCK] = tind_block;
348 static int do_inode_attach_indirect(struct ext4_inode *inode,
353 if (inode_attach_direct_blocks(inode, alloc, &count)) {
354 error("failed to attach direct blocks to inode");
359 if (inode_attach_indirect_blocks(inode, alloc, &count)) {
360 error("failed to attach indirect blocks to inode");
366 if (inode_attach_dindirect_blocks(inode, alloc, &count)) {
367 error("failed to attach dindirect blocks to inode");
373 if (inode_attach_tindirect_blocks(inode, alloc, &count)) {
374 error("failed to attach tindirect blocks to inode");
390 struct ext4_inode *inode, u32 block_len)
404 /* Allocates enough blocks to hold len bytes and connects them to an inode */
405 void inode_allocate_indirect(struct ext4_inode *inode, unsigned long len)
411 alloc = do_inode_allocate_indirect(inode, block_len);
420 if (do_inode_attach_indirect(inode, alloc, block_len))
421 error("failed to attach blocks to indirect inode");
423 inode->i_flags = 0;
424 inode->i_blocks_lo = (block_len + indirect_len) * info.block_size / 512;
425 inode->i_size_lo = len;
430 void inode_attach_resize(struct ext4_inode *inode,
479 inode->i_block[EXT4_DIND_BLOCK] = dind_block;
480 inode->i_flags = 0;
481 inode->i_blocks_lo = blocks;
482 inode->osd2.linux2.l_i_blocks_high = blocks >> 32;
483 inode->i_size_lo = size;
484 inode->i_size_high = size >> 32;
488 buffer, and connects them to an inode. Returns a pointer to the data
490 u8 *inode_allocate_data_indirect(struct ext4_inode *inode, unsigned long len,
497 alloc = do_inode_allocate_indirect(inode, block_len);
510 if (do_inode_attach_indirect(inode, alloc, block_len))
511 error("failed to attach blocks to indirect inode");