xfs
[Top] [All Lists]

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

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfsprogs: initialize filetype for lost+found creation
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 17 Sep 2013 12:07:45 -0500
Delivered-to: xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
If we create lost+found make sure it's got the proper filetype.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

(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;
 

<Prev in Thread] Current Thread [Next in Thread>