Home | History | Annotate | Download | only in e2fsck

Lines Matching full:inode

20  *	- The inode number in the directory entry should be within
22 * - The inode number should refer to a in-use inode.
23 * - The first entry should be '.', and its inode should be
24 * the inode of the directory.
31 * - The inode numbers of the subdirectories for each directory.
60 * Keeps track of how many times an inode is referenced.
352 if (!dirent->inode)
365 dirent->inode = ino;
373 if (dirent->inode != ino) {
375 dirent->inode = ino;
389 nextdir->inode = 0;
400 * directory entry is sane. We do not check the inode number of '..'
409 if (!dirent->inode)
424 * Note: we don't have the parent inode just
426 * inode. This will get fixed in pass 3.
428 dirent->inode = EXT2_ROOT_INO;
437 if (e2fsck_dir_info_set_dotdot(ctx, ino, dirent->inode)) {
481 struct ext2_inode inode;
492 if (ext2fs_test_inode_bitmap(ctx->inode_dir_map, dirent->inode)) {
495 dirent->inode)) {
499 dirent->inode))
502 e2fsck_read_inode(ctx, dirent->inode, &inode,
504 should_be = ext2_file_type(inode.i_mode);
665 dirent->inode <= fs->super->s_inodes_count &&
698 dirent->inode = 0;
743 * Make sure the inode is still in use (could have been
772 printf("In process_dir_block block %lu, #%d, inode %lu\n", block_nr,
827 } else if ((dirent->inode == 0) &&
876 } else if (dirent->inode == ino) {
879 dirent->inode = 0;
884 if (!dirent->inode)
888 * Make sure the inode listed is a legal one.
890 if (((dirent->inode != EXT2_ROOT_INO) &&
891 (dirent->inode < EXT2_FIRST_INODE(fs->super))) ||
892 (dirent->inode > fs->super->s_inodes_count)) {
896 dirent->inode))) {
898 * If the inode is in a bad block, offer to
922 (dirent->inode == EXT2_ROOT_INO)) {
940 dirent->inode = 0;
951 * If the inode was marked as having bad fields in
958 dirent->inode)) {
960 dirent->inode,
962 dirent->inode = 0;
970 group = ext2fs_group_of_ino(fs, dirent->inode);
977 * Check if the inode was missed out because
985 pctx.num = dirent->inode;
997 } else if (dirent->inode >= first_unused_inode) {
998 pctx.num = dirent->inode;
1011 dirent->inode))) {
1013 * If the inode is unused, offer to clear it.
1020 dirent->inode = 0;
1057 dirent->inode))) {
1058 if (e2fsck_dir_info_get_parent(ctx, dirent->inode,
1060 cd->pctx.ino = dirent->inode;
1068 dirent->inode = 0;
1075 dirent->inode, ino);
1094 ext2fs_icount_increment(ctx->inode_count, dirent->inode,
1148 * functioned called by deallocate inode via ext2fs_iterate_block().
1170 * This fuction deallocates an inode
1175 struct ext2_inode inode;
1179 e2fsck_read_inode(ctx, ino, &inode, "deallocate_inode");
1180 e2fsck_clear_inode(ctx, ino, &inode, 0, "deallocate_inode");
1188 ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(inode.i_mode));
1190 if (inode.i_file_acl &&
1192 pctx.errcode = ext2fs_adjust_ea_refcount(fs, inode.i_file_acl,
1199 pctx.blk = inode.i_file_acl;
1206 inode.i_file_acl);
1207 ext2fs_block_alloc_stats(fs, inode.i_file_acl, -1);
1209 inode.i_file_acl = 0;
1212 if (!ext2fs_inode_has_valid_blocks(&inode))
1215 if (LINUX_S_ISREG(inode.i_mode) &&
1216 (inode.i_size_high || inode.i_size & 0x80000000UL))
1229 * This fuction clears the htree flag on an inode
1233 struct ext2_inode inode;
1235 e2fsck_read_inode(ctx, ino, &inode, "clear_htree");
1236 inode.i_flags = inode.i_flags & ~EXT2_INDEX_FL;
1237 e2fsck_write_inode(ctx, ino, &inode, "clear_htree");
1247 struct ext2_inode inode;
1254 e2fsck_read_inode(ctx, ino, &inode, "process_bad_inode");
1259 pctx.inode = &inode;
1261 if (inode.i_file_acl &&
1264 inode.i_file_acl = 0;
1270 if (!LINUX_S_ISDIR(inode.i_mode) && !LINUX_S_ISREG(inode.i_mode) &&
1271 !LINUX_S_ISCHR(inode.i_mode) && !LINUX_S_ISBLK(inode.i_mode) &&
1272 !LINUX_S_ISLNK(inode.i_mode) && !LINUX_S_ISFIFO(inode.i_mode) &&
1273 !(LINUX_S_ISSOCK(inode.i_mode)))
1275 else if (LINUX_S_ISCHR(inode.i_mode)
1276 && !e2fsck_pass1_check_device_inode(fs, &inode))
1278 else if (LINUX_S_ISBLK(inode.i_mode)
1279 && !e2fsck_pass1_check_device_inode(fs, &inode))
1281 else if (LINUX_S_ISFIFO(inode.i_mode)
1282 && !e2fsck_pass1_check_device_inode(fs, &inode))
1284 else if (LINUX_S_ISSOCK(inode.i_mode)
1285 && !e2fsck_pass1_check_device_inode(fs, &inode))
1287 else if (LINUX_S_ISLNK(inode.i_mode)
1288 && !e2fsck_pass1_check_symlink(fs, ino, &inode, buf)) {
1303 if (inode.i_faddr) {
1305 inode.i_faddr = 0;
1313 frag = &inode.osd2.hurd2.h_i_frag;
1314 fsize = &inode.osd2.hurd2.h_i_fsize;
1341 (inode.osd2.linux2.l_i_blocks_hi != 0)) {
1342 pctx.num = inode.osd2.linux2.l_i_blocks_hi;
1344 inode.osd2.linux2.l_i_blocks_hi = 0;
1351 inode.osd2.linux2.l_i_file_acl_high != 0) {
1352 pctx.num = inode.osd2.linux2.l_i_file_acl_high;
1354 inode.osd2.linux2.l_i_file_acl_high = 0;
1360 if (inode.i_file_acl &&
1361 ((inode.i_file_acl < fs->super->s_first_data_block) ||
1362 (inode.i_file_acl >= fs->super->s_blocks_count))) {
1364 inode.i_file_acl = 0;
1369 if (inode.i_dir_acl &&
1370 LINUX_S_ISDIR(inode.i_mode)) {
1372 inode.i_dir_acl = 0;
1379 e2fsck_write_inode(ctx, ino, &inode, "process_bad_inode");
1388 * block for a particular inode; this is done if a directory has
1400 struct ext2_inode inode;
1406 * Read the inode and block bitmaps in; we'll be messing with
1425 * Now let's create the actual data block for the inode
1448 * Update the inode block count
1450 e2fsck_read_inode(ctx, db->ino, &inode, "allocate_dir_block");
1451 ext2fs_iblk_add_blocks(fs, &inode, 1);
1452 if (inode.i_size < (db->blockcnt+1) * fs->blocksize)
1453 inode.i_size = (db->blockcnt+1) * fs->blocksize;
1454 e2fsck_write_inode(ctx, db->ino, &inode, "allocate_dir_block");
1457 * Finally, update the block pointers for the inode
1460 pctx->errcode = ext2fs_bmap(fs, db->ino, &inode, 0, BMAP_SET,