Lines Matching full:inode
76 pctx.errcode = ext2fs_allocate_inode_bitmap(fs, _("inode done bitmap"),
138 * This makes sure the root inode is present; if not, we ask if the
145 struct ext2_inode inode;
153 * If the root inode is not a directory, die here. The
188 * Now let's create the actual data block for the inode
209 * Set up the inode structure
211 memset(&inode, 0, sizeof(inode));
212 inode.i_mode = 040755;
213 inode.i_size = fs->blocksize;
214 inode.i_atime = inode.i_ctime = inode.i_mtime = ctx->now;
215 inode.i_links_count = 2;
216 ext2fs_iblk_set(fs, &inode, 1);
217 inode.i_block[0] = blk;
220 * Write out the inode.
222 pctx.errcode = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
268 * Mark this inode as being "done"; by the time we
269 * return from this function, the inode we either be
312 * greater than 2048, try again with the inode
320 pctx->errcode = ext2fs_allocate_inode_bitmap(fs, _("inode loop detection bitmap"), &inode_loop_detect);
351 * This routine gets the lost_and_found inode, making it a directory
360 struct ext2_inode inode;
404 * Read the inode and block bitmaps in; we'll be messing with
422 * Next find a free inode.
436 * Now let's create the actual data block for the inode
454 * Set up the inode structure
456 memset(&inode, 0, sizeof(inode));
457 inode.i_mode = 040700;
458 inode.i_size = fs->blocksize;
459 inode.i_atime = inode.i_ctime = inode.i_mtime = ctx->now;
460 inode.i_links_count = 2;
461 ext2fs_iblk_set(fs, &inode, 1);
462 inode.i_block[0] = blk;
465 * Next, write out the inode.
467 pctx.errcode = ext2fs_write_new_inode(fs, ino, &inode);
492 printf("/lost+found created; inode #%lu\n", ino);
506 struct ext2_inode inode;
522 if (ext2fs_read_inode(fs, ino, &inode) == 0)
523 file_type = ext2_file_type(inode.i_mode);
549 * Utility routine to adjust the inode counts on an inode.
555 struct ext2_inode inode;
560 retval = ext2fs_read_inode(fs, ino, &inode);
565 printf("Adjusting link count for inode %lu by %d (from %d)\n", ino, adj,
566 inode.i_links_count);
571 if (inode.i_links_count == (__u16) ~0)
574 inode.i_links_count++;
577 if (inode.i_links_count == 0)
580 inode.i_links_count--;
583 retval = ext2fs_write_inode(fs, ino, &inode);
617 retval = e2fsck_adjust_inode_count(fp->ctx, dirent->inode, -1);
627 dirent->inode = fp->parent;
652 printf("Fixing '..' of inode %lu to be %lu...\n", ino, parent);
756 struct ext2_inode inode;
762 * Read the inode and block bitmaps in; we'll be messing with
785 * Update the size and block count fields in the inode.
787 retval = ext2fs_read_inode(fs, dir, &inode);
791 inode.i_size = (es.last_block + 1) * fs->blocksize;
792 ext2fs_iblk_add_blocks(fs, &inode, es.newblocks);
794 e2fsck_write_inode(ctx, dir, &inode, "expand_directory");