Lines Matching full:inode
42 * helper function to release an inode
94 * If we are truncating an orphan, then update the inode fields
149 * This function releases an inode. Returns 1 if an inconsistency was
150 * found. If the inode has a link count, then it is being truncated and
154 struct ext2_inode *inode, char *block_buf,
162 if (!ext2fs_inode_has_valid_blocks(inode))
170 if (inode->i_links_count) {
173 ((((long long)inode->i_size_high << 32) +
174 inode->i_size + fs->blocksize - 1) /
176 pb.truncate_offset = inode->i_size % fs->blocksize;
187 _("while calling ext2fs_block_iterate for inode %d"),
194 /* Refresh the inode since ext2fs_block_iterate may have changed it */
195 e2fsck_read_inode(ctx, ino, inode, "release_inode_blocks");
198 ext2fs_iblk_sub_blocks(fs, inode, pb.truncated_blocks);
200 if (inode->i_file_acl) {
201 retval = ext2fs_adjust_ea_refcount(fs, inode->i_file_acl,
209 _("while calling ext2fs_adjust_ea_refcount for inode %d"),
214 ext2fs_block_alloc_stats(fs, inode->i_file_acl, -1);
215 inode->i_file_acl = 0;
228 struct ext2_inode inode;
236 * Win or lose, we won't be using the head of the orphan inode
263 e2fsck_read_inode(ctx, ino, &inode, "release_orphan_inodes");
266 pctx.inode = &inode;
267 pctx.str = inode.i_links_count ? _("Truncating") :
272 next_ino = inode.i_dtime;
281 if (release_inode_blocks(ctx, ino, &inode, block_buf, &pctx))
284 if (!inode.i_links_count) {
286 LINUX_S_ISDIR(inode.i_mode));
287 inode.i_dtime = ctx->now;
289 inode.i_dtime = 0;
291 e2fsck_write_inode(ctx, ino, &inode, "delete_file");
302 * Check the resize inode to make sure it is sane. We check both for
304 * resize inode should be cleared) as well as the case where on-line
310 struct ext2_inode inode;
321 * If the resize inode feature isn't set, then
336 /* Read the resize inode */
338 retval = ext2fs_read_inode(fs, EXT2_RESIZE_INO, &inode);
347 * If the resize inode feature isn't set, check to make sure
348 * the resize inode is cleared; then we're done.
353 if (inode.i_block[i])
358 memset(&inode, 0, sizeof(inode));
359 e2fsck_write_inode(ctx, EXT2_RESIZE_INO, &inode,
366 * The resize inode feature is enabled; check to make sure the
369 blk = inode.i_block[EXT2_DIND_BLOCK];
371 if (i != EXT2_DIND_BLOCK && inode.i_block[i])
374 if ((i < EXT2_N_BLOCKS) || !blk || !inode.i_links_count ||
375 !(inode.i_mode & LINUX_S_IFREG) ||
380 memset(&inode, 0, sizeof(inode));
381 e2fsck_write_inode(ctx, EXT2_RESIZE_INO, &inode,