Lines Matching full:inode
91 com_err(device, 0, "catastrophic mode - not reading inode or group bitmaps");
95 com_err(device, retval, "while reading inode bitmap");
349 "inode bitmap at %u, "
350 "inode table at %u\n"
359 gdp->bg_free_inodes_count != 1 ? "inodes" : "inode",
366 gdp->bg_itable_unused != 1 ? "inodes":"inode");
368 print_bg_opts(gdp, EXT2_BG_INODE_UNINIT, "Inode not init",
496 struct ext2_inode_large *inode)
503 fprintf(out, "Size of extra inode fields: %u\n", inode->i_extra_isize);
504 if (inode->i_extra_isize > EXT2_INODE_SIZE(current_fs->super) -
506 fprintf(stderr, "invalid inode->i_extra_isize (%u)\n",
507 inode->i_extra_isize);
512 inode->i_extra_isize;
513 magic = (__u32 *)((char *)inode + EXT2_GOOD_OLD_INODE_SIZE +
514 inode->i_extra_isize);
516 fprintf(out, "Extended attributes stored in inode body: \n");
517 end = (char *) inode + EXT2_INODE_SIZE(current_fs->super);
525 fprintf(out, "invalid EA entry in inode\n");
540 static void dump_blocks(FILE *f, const char *prefix, ext2_ino_t inode)
549 ext2fs_block_iterate2(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL,
689 ext2_ino_t inode_num, struct ext2_inode *inode,
700 large_inode = (struct ext2_inode_large *) inode;
702 if (LINUX_S_ISDIR(inode->i_mode)) i_type = "directory";
703 else if (LINUX_S_ISREG(inode->i_mode)) i_type = "regular";
704 else if (LINUX_S_ISLNK(inode->i_mode)) i_type = "symlink";
705 else if (LINUX_S_ISBLK(inode->i_mode)) i_type = "block special";
706 else if (LINUX_S_ISCHR(inode->i_mode)) i_type = "character special";
707 else if (LINUX_S_ISFIFO(inode->i_mode)) i_type = "FIFO";
708 else if (LINUX_S_ISSOCK(inode->i_mode)) i_type = "socket";
712 prefix, inode->i_mode & 0777, inode->i_flags);
715 prefix, inode->i_generation, large_inode->i_version_hi,
716 inode->osd1.linux1.l_i_version);
719 inode->i_generation, inode->osd1.linux1.l_i_version);
722 prefix, inode_uid(*inode), inode_gid(*inode));
723 if (LINUX_S_ISREG(inode->i_mode)) {
724 unsigned long long i_size = (inode->i_size |
725 ((unsigned long long)inode->i_size_high << 32));
729 fprintf(out, "%d\n", inode->i_size);
734 inode->i_file_acl, LINUX_S_ISDIR(inode->i_mode) ? inode->i_dir_acl : 0,
735 inode->osd1.hurd1.h_i_translator);
739 inode->i_file_acl | ((long long)
740 (inode->osd2.linux2.l_i_file_acl_high) << 32),
741 LINUX_S_ISDIR(inode->i_mode) ? inode->i_dir_acl : 0);
744 prefix, inode->i_links_count,
746 inode->osd2.linux2.l_i_blocks_hi << 32)) +
747 inode->i_blocks);
750 prefix, inode->i_links_count, inode->i_blocks);
753 frag = inode->osd2.hurd2.h_i_frag;
754 fsize = inode->osd2.hurd2.h_i_fsize;
760 prefix, inode->i_faddr, frag, fsize);
763 inode->i_ctime, large_inode->i_ctime_extra,
764 time_to_string(inode->i_ctime));
766 inode->i_atime, large_inode->i_atime_extra,
767 time_to_string(inode->i_atime));
769 inode->i_mtime, large_inode->i_mtime_extra,
770 time_to_string(inode->i_mtime));
775 fprintf(out, "%sctime: 0x%08x -- %s", prefix, inode->i_ctime,
776 time_to_string(inode->i_ctime));
777 fprintf(out, "%satime: 0x%08x -- %s", prefix, inode->i_atime,
778 time_to_string(inode->i_atime));
779 fprintf(out, "%smtime: 0x%08x -- %s", prefix, inode->i_mtime,
780 time_to_string(inode->i_mtime));
782 if (inode->i_dtime)
783 fprintf(out, "%sdtime: 0x%08x -- %s", prefix, inode->i_dtime,
784 time_to_string(inode->i_dtime));
787 (struct ext2_inode_large *) inode);
788 if (LINUX_S_ISLNK(inode->i_mode) && ext2fs_inode_data_blocks(current_fs,inode) == 0)
790 (int) inode->i_size, (char *)inode->i_block);
791 else if (LINUX_S_ISBLK(inode->i_mode) || LINUX_S_ISCHR(inode->i_mode)) {
795 if (inode->i_block[0]) {
796 major = (inode->i_block[0] >> 8) & 255;
797 minor = inode->i_block[0] & 255;
800 major = (inode->i_block[1] & 0xfff00) >> 8;
801 minor = ((inode->i_block[1] & 0xff) |
802 ((inode->i_block[1] >> 12) & 0xfff00));
808 if (inode->i_flags & EXT4_EXTENTS_FL)
816 static void dump_inode(ext2_ino_t inode_num, struct ext2_inode *inode)
821 internal_dump_inode(out, "", inode_num, inode, 1);
827 ext2_ino_t inode;
840 if (common_inode_args_process(argc, argv, &inode, 0)) {
845 if (debugfs_read_inode_full(inode, inode_buf, argv[0],
851 dump_inode(inode, inode_buf);
858 struct ext2_inode inode;
894 if (debugfs_read_inode(ino, &inode, argv[0]))
897 if ((inode.i_flags & EXT4_EXTENTS_FL) == 0) {
903 logical_width = int_log10(((inode.i_size |
904 (__u64) inode.i_size_high << 32) +
921 ext2_ino_t inode;
924 if (common_inode_args_process(argc, argv, &inode, 0))
927 retval = ext2fs_check_directory(current_fs, inode);
932 root = inode;
937 ext2_ino_t inode;
940 if (common_inode_args_process(argc, argv, &inode, CHECK_FS_RW))
943 if (debugfs_read_inode(inode, &inode_buf, argv[0]))
946 if (debugfs_write_inode(inode, &inode_buf, argv[0]))
952 ext2_ino_t inode;
954 if (common_inode_args_process(argc, argv, &inode,
958 if (!ext2fs_test_inode_bitmap(current_fs->inode_map,inode))
959 com_err(argv[0], 0, "Warning: inode already clear");
960 ext2fs_unmark_inode_bitmap(current_fs->inode_map,inode);
966 ext2_ino_t inode;
968 if (common_inode_args_process(argc, argv, &inode,
972 if (ext2fs_test_inode_bitmap(current_fs->inode_map,inode))
973 com_err(argv[0], 0, "Warning: inode already set");
974 ext2fs_mark_inode_bitmap(current_fs->inode_map,inode);
980 ext2_ino_t inode;
982 if (common_inode_args_process(argc, argv, &inode, CHECK_FS_BITMAPS))
985 if (ext2fs_test_inode_bitmap(current_fs->inode_map,inode))
986 printf("Inode %u is marked in use\n", inode);
988 printf("Inode %u is not in use\n", inode);
1114 struct ext2_inode inode;
1130 if (debugfs_read_inode(inode_num, &inode, argv[1]))
1133 modify_u16(argv[0], "Mode", octal_format, &inode.i_mode);
1134 modify_u16(argv[0], "User ID", decimal_format, &inode.i_uid);
1135 modify_u16(argv[0], "Group ID", decimal_format, &inode.i_gid);
1136 modify_u32(argv[0], "Size", unsignedlong_format, &inode.i_size);
1137 modify_u32(argv[0], "Creation time", decimal_format, &inode.i_ctime);
1138 modify_u32(argv[0], "Modification time", decimal_format, &inode.i_mtime);
1139 modify_u32(argv[0], "Access time", decimal_format, &inode.i_atime);
1140 modify_u32(argv[0], "Deletion time", decimal_format, &inode.i_dtime);
1141 modify_u16(argv[0], "Link count", decimal_format, &inode.i_links_count);
1144 &inode.osd2.linux2.l_i_blocks_hi);
1145 modify_u32(argv[0], "Block count", unsignedlong_format, &inode.i_blocks);
1146 modify_u32(argv[0], "File flags", hex_format, &inode.i_flags);
1147 modify_u32(argv[0], "Generation", hex_format, &inode.i_generation);
1149 modify_u32(argv[0], "Reserved1", decimal_format, &inode.i_reserved1);
1151 modify_u32(argv[0], "File acl", decimal_format, &inode.i_file_acl);
1152 if (LINUX_S_ISDIR(inode.i_mode))
1153 modify_u32(argv[0], "Directory acl", decimal_format, &inode.i_dir_acl);
1155 modify_u32(argv[0], "High 32bits of size", decimal_format, &inode.i_size_high);
1159 decimal_format, &inode.osd1.hurd1.h_i_translator);
1161 modify_u32(argv[0], "Fragment address", decimal_format, &inode.i_faddr);
1164 frag = &inode.osd2.hurd2.h_i_frag;
1165 fsize = &inode.osd2.hurd2.h_i_fsize;
1177 modify_u32(argv[0], buf, decimal_format, &inode.i_block[i]);
1180 &inode.i_block[EXT2_IND_BLOCK]);
1182 &inode.i_block[EXT2_DIND_BLOCK]);
1184 &inode.i_block[EXT2_TIND_BLOCK]);
1185 if (debugfs_write_inode(inode_num, &inode, argv[1]))
1191 ext2_ino_t inode;
1194 if (common_inode_args_process(argc, argv, &inode, 0))
1197 retval = ext2fs_check_directory(current_fs, inode);
1202 cwd = inode;
1220 printf("[pwd] INODE: %6u PATH: %s\n",
1231 printf("[root] INODE: %6u PATH: %s\n",
1272 struct ext2_inode inode;
1278 * Get the source inode
1312 if (debugfs_read_inode(ino, &inode, sourcename))
1316 ext2_file_type(inode.i_mode));
1346 struct ext2_inode inode;
1357 if (debugfs_read_inode(ino, &inode, argv[1]))
1361 com_err(argv[1], 0, "Inode is not marked as deleted");
1369 inode.i_links_count = LINUX_S_ISDIR(inode.i_mode) ? 2 : 1;
1370 inode.i_dtime = 0;
1372 if (debugfs_write_inode(ino, &inode, argv[0]))
1503 printf("Free inode found: %u\n", free_inode);
1554 struct ext2_inode inode;
1584 printf("Allocated inode: %u\n", newfile);
1603 com_err(argv[0], 0, "Warning: inode already set");
1605 memset(&inode, 0, sizeof(inode));
1606 inode.i_mode = (statbuf.st_mode & ~LINUX_S_IFMT) | LINUX_S_IFREG;
1607 inode.i_atime = inode.i_ctime = inode.i_mtime =
1609 inode.i_links_count = 1;
1610 inode.i_size = statbuf.st_size;
1613 inode.i_flags |= EXT4_EXTENTS_FL;
1614 if (debugfs_write_new_inode(newfile, &inode, argv[0])) {
1618 if (LINUX_S_ISREG(inode.i_mode)) {
1631 struct ext2_inode inode;
1677 printf("Allocated inode: %u\n", newfile);
1693 com_err(argv[0], 0, "Warning: inode already set");
1696 memset(&inode, 0, sizeof(inode));
1697 inode.i_mode = mode;
1698 inode.i_atime = inode.i_ctime = inode.i_mtime =
1701 inode.i_block[0] = major*256+minor;
1702 inode.i_block[1] = 0;
1704 inode.i_block[0] = 0;
1705 inode.i_block[1] = (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
1707 inode.i_links_count = 1;
1708 if (debugfs_write_new_inode(newfile, &inode, argv[0]))
1765 static void kill_file_by_inode(ext2_ino_t inode)
1769 if (debugfs_read_inode(inode, &inode_buf, 0))
1772 if (debugfs_write_inode(inode, &inode_buf, 0))
1777 ext2fs_block_iterate(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL,
1780 ext2fs_inode_alloc_stats2(current_fs, inode, -1,
1799 struct ext2_inode inode;
1811 if (debugfs_read_inode(inode_num, &inode, argv[0]))
1814 if (LINUX_S_ISDIR(inode.i_mode)) {
1819 --inode.i_links_count;
1820 if (debugfs_write_inode(inode_num, &inode, argv[0]))
1824 if (inode.i_links_count == 0)
1843 if (dirent->inode == 0)
1849 rds->parent = dirent->inode;
1860 struct ext2_inode inode;
1873 if (debugfs_read_inode(inode_num, &inode, argv[0]))
1876 if (!LINUX_S_ISDIR(inode.i_mode)) {
1895 inode.i_links_count = 0;
1896 if (debugfs_write_inode(inode_num, &inode, argv[0]))
1903 if (debugfs_read_inode(rds.parent, &inode, argv[0]))
1905 if (inode.i_links_count > 1)
1906 inode.i_links_count--;
1907 if (debugfs_write_inode(rds.parent, &inode, argv[0]))
1926 ext2_ino_t inode;
1929 if (common_inode_args_process(argc, argv, &inode, CHECK_FS_RW))
1932 retval = ext2fs_expand_dir(current_fs, inode);
2000 com_err(argv[0], 0, "Inode table for group %lu is missing\n",
2008 printf("Inode %d is part of block group %lu\n"