2007-03-31 Theodore Tso <tytso@mit.edu>
+ * pass3.c (fix_dotdot_proc): Fix the filetype of the '..' entry to
+ be EXT2_FT_DIR. (Addresses Lustre BZ #11645)
+
* pass1.c (e2fsck_pass1_check_device_inode): Don't assume that a
special device is bogus just because i_blocks is non-zero.
The i_blocks field could get adjusted later, and if this
fix_problem(fp->ctx, PR_3_ADJUST_INODE, &pctx);
}
dirent->inode = fp->parent;
+ if (fp->ctx->fs->super->s_feature_incompat &
+ EXT2_FEATURE_INCOMPAT_FILETYPE)
+ dirent->name_len = (dirent->name_len & 0xFF) |
+ (EXT2_FT_DIR << 8);
+ else
+ dirent->name_len = dirent->name_len & 0xFF;
fp->done++;
return DIRENT_ABORT | DIRENT_CHANGED;
--- /dev/null
+Pass 1: Checking inodes, blocks, and sizes
+Special (device/socket/fifo) inode 12 has non-zero size. Fix? yes
+
+Inode 12, i_blocks is 2, should be 0. Fix? yes
+
+Pass 2: Checking directory structure
+Entry 'dir' in / (2) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Entry '..' in ??? (13) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Entry '..' in ??? (14) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Entry '..' in ??? (15) has an incorrect filetype (was 2, should be 6).
+Fix? yes
+
+Pass 3: Checking directory connectivity
+Unconnected directory inode 13 (???)
+Connect to /lost+found? yes
+
+Unconnected directory inode 14 (???)
+Connect to /lost+found? yes
+
+Unconnected directory inode 15 (???)
+Connect to /lost+found? yes
+
+Pass 4: Checking reference counts
+Inode 2 ref count is 4, should be 3. Fix? yes
+
+Inode 12 ref count is 2, should be 1. Fix? yes
+
+Inode 13 ref count is 3, should be 2. Fix? yes
+
+Inode 14 ref count is 3, should be 2. Fix? yes
+
+Inode 15 ref count is 3, should be 2. Fix? yes
+
+Pass 5: Checking group summary information
+Block bitmap differences: -23
+Fix? yes
+
+Free blocks count wrong for group #0 (73, counted=74).
+Fix? yes
+
+Free blocks count wrong (73, counted=74).
+Fix? yes
+
+Directories count wrong for group #0 (6, counted=5).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 15/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 1
--- /dev/null
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 15/32 files (0.0% non-contiguous), 26/100 blocks
+Exit status is 0