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;
1020 dirent->inode)))
1025 dirent->inode = 0;
1062 dirent->inode))) {
1063 if (e2fsck_dir_info_get_parent(ctx, dirent->inode,
1065 cd->pctx.ino = dirent->inode;
1073 dirent->inode = 0;
1080 dirent->inode, ino);
1099 ext2fs_icount_increment(ctx->inode_count, dirent->inode,
1153 * functioned called by deallocate inode via ext2fs_iterate_block().
1175 * This fuction deallocates an inode
1180 struct ext2_inode inode;
1184 e2fsck_read_inode(ctx, ino, &inode, "deallocate_inode");
1185 e2fsck_clear_inode(ctx, ino, &inode, 0, "deallocate_inode");
1193 ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(inode.i_mode));
1195 if (inode.i_file_acl &&
1197 pctx.errcode = ext2fs_adjust_ea_refcount(fs, inode.i_file_acl,
1204 pctx.blk = inode.i_file_acl;
1211 inode.i_file_acl);
1212 ext2fs_block_alloc_stats(fs, inode.i_file_acl, -1);
1214 inode.i_file_acl = 0;
1217 if (!ext2fs_inode_has_valid_blocks(&inode))
1220 if (LINUX_S_ISREG(inode.i_mode) &&
1221 (inode.i_size_high || inode.i_size & 0x80000000UL))
1234 * This fuction clears the htree flag on an inode
1238 struct ext2_inode inode;
1240 e2fsck_read_inode(ctx, ino, &inode, "clear_htree");
1241 inode.i_flags = inode.i_flags & ~EXT2_INDEX_FL;
1242 e2fsck_write_inode(ctx, ino, &inode, "clear_htree");
1252 struct ext2_inode inode;
1259 e2fsck_read_inode(ctx, ino, &inode, "process_bad_inode");
1264 pctx.inode = &inode;
1266 if (inode.i_file_acl &&
1269 inode.i_file_acl = 0;
1275 if (!LINUX_S_ISDIR(inode.i_mode) && !LINUX_S_ISREG(inode.i_mode) &&
1276 !LINUX_S_ISCHR(inode.i_mode) && !LINUX_S_ISBLK(inode.i_mode) &&
1277 !LINUX_S_ISLNK(inode.i_mode) && !LINUX_S_ISFIFO(inode.i_mode) &&
1278 !(LINUX_S_ISSOCK(inode.i_mode)))
1280 else if (LINUX_S_ISCHR(inode.i_mode)
1281 && !e2fsck_pass1_check_device_inode(fs, &inode))
1283 else if (LINUX_S_ISBLK(inode.i_mode)
1284 && !e2fsck_pass1_check_device_inode(fs, &inode))
1286 else if (LINUX_S_ISFIFO(inode.i_mode)
1287 && !e2fsck_pass1_check_device_inode(fs, &inode))
1289 else if (LINUX_S_ISSOCK(inode.i_mode)
1290 && !e2fsck_pass1_check_device_inode(fs, &inode))
1292 else if (LINUX_S_ISLNK(inode.i_mode)
1293 && !e2fsck_pass1_check_symlink(fs, ino, &inode, buf)) {
1308 if (inode.i_faddr) {
1310 inode.i_faddr = 0;
1318 frag = &inode.osd2.hurd2.h_i_frag;
1319 fsize = &inode.osd2.hurd2.h_i_fsize;
1346 (inode.osd2.linux2.l_i_blocks_hi != 0)) {
1347 pctx.num = inode.osd2.linux2.l_i_blocks_hi;
1349 inode.osd2.linux2.l_i_blocks_hi = 0;
1356 inode.osd2.linux2.l_i_file_acl_high != 0) {
1357 pctx.num = inode.osd2.linux2.l_i_file_acl_high;
1359 inode.osd2.linux2.l_i_file_acl_high = 0;
1365 if (inode.i_file_acl &&
1366 ((inode.i_file_acl < fs->super->s_first_data_block) ||
1367 (inode.i_file_acl >= fs->super->s_blocks_count))) {
1369 inode.i_file_acl = 0;
1374 if (inode.i_dir_acl &&
1375 LINUX_S_ISDIR(inode.i_mode)) {
1377 inode.i_dir_acl = 0;
1384 e2fsck_write_inode(ctx, ino, &inode, "process_bad_inode");
1393 * block for a particular inode; this is done if a directory has
1405 struct ext2_inode inode;
1411 * Read the inode and block bitmaps in; we'll be messing with
1430 * Now let's create the actual data block for the inode
1453 * Update the inode block count
1455 e2fsck_read_inode(ctx, db->ino, &inode, "allocate_dir_block");
1456 ext2fs_iblk_add_blocks(fs, &inode, 1);
1457 if (inode.i_size < (db->blockcnt+1) * fs->blocksize)
1458 inode.i_size = (db->blockcnt+1) * fs->blocksize;
1459 e2fsck_write_inode(ctx, db->ino, &inode, "allocate_dir_block");
1462 * Finally, update the block pointers for the inode
1465 pctx->errcode = ext2fs_bmap(fs, db->ino, &inode, 0, BMAP_SET,