Whamcloud - gitweb
Fix e2fsck to set the filetype of '..' when connecting a dir, to lost+found
authorTheodore Ts'o <tytso@mit.edu>
Sat, 31 Mar 2007 23:18:24 +0000 (19:18 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 31 Mar 2007 23:18:24 +0000 (19:18 -0400)
commit56c8c592ac48c0fc9772153bb7bdf621b1de0ab9
tree7776c3119ddfd1f46ab327aef0afb386e6c313dc
parent441ab1e02096e3c968cae6ddfde73140fcad8199
Fix e2fsck to set the filetype of '..' when connecting a dir, to lost+found

If there is an orphaned inode whose '..' entry is pointing at a special
file, the filetype of the '..' entry will set to the type of the special
file.  When the orphaned directory is reconnected to /lost+found, the
filetype of the '..' field is not reset to EXT2_FT_DIR, so a second
e2fsck is required to repair the filesystem.

We address this situation by setting the filetype of '..' when we
reconnect the inode to /lost+found.

Addresses Lustre Bug: #11645

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/ChangeLog
e2fsck/pass3.c
tests/ChangeLog
tests/f_orphan_dotdot_ft/expect.1 [new file with mode: 0644]
tests/f_orphan_dotdot_ft/expect.2 [new file with mode: 0644]
tests/f_orphan_dotdot_ft/image.gz [new file with mode: 0644]
tests/f_orphan_dotdot_ft/name [new file with mode: 0644]