When we move disconnected inodes to lost+found, they aren't
assigned a dtype. Fix this by just setting XFS_DIR3_FT_UNKNOWN
for now. If the files are moved out of lost+found, the type
will be properly set at that time.
When repair gains more type knowledge we could use xfs_mode_to_ftype[]
to set the proper type when moved, but right now it's not a big
deal; UNKNOWN will suffice for files in lost+found, and prevents
us from using an uninitialized value.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
xname.name = fname;
xname.len = snprintf((char *)fname, sizeof(fname), "%llu",
(unsigned long long)ino);
+ /* XXX use xfs_mode_to_ftype[] when userspace gains it */
+ xname.type = XFS_DIR3_FT_UNKNOWN;
err = libxfs_iget(mp, NULL, orphanage_ino, 0, &orphanage_ip, 0);
if (err)