[PATCH] xfsprogs: initialize filetype for lost+found creation

Eric Sandeen
2013-09-17T17:07:50Z

If we create lost+found make sure it's got the proper filetype.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

(sorry, untested, not sure how to force creation when I can't use
xfs_db to craft a filesystem that needs lost+found)

diff --git a/repair/phase6.c b/repair/phase6.c
index a4ad7a3..946cb6d 100644
--- a/repair/phase6.c
+++ b/repair/phase6.c
@@ -904,6 +904,8 @@ mk_orphanage(xfs_mount_t *mp)

xname.name = (unsigned char *)ORPHANAGE;
xname.len = strlen(ORPHANAGE);
+ xname.type = XFS_DIR3_FT_DIR;
+
if (libxfs_dir_lookup(NULL, pip, &xname, &ino, NULL) == 0)
return ino;