Skip to contentSkip to conversation

xfs_repair: add d_type when moving files to lost+found

PATCH In review Eric Sandeen 2 participants 4 messages Oct 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs_repair: add d_type when moving files to lost+found

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.

---

repair/phase6.c +2 -0
index f84bdc0..41f6bfc 100644
@@ -1041,6 +1041,8 @@ mv_orphanage(
 	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)

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by
#2 lore raw

oops ment to send this
Looks good.

Quoted 9 lines · Rich Johnston

This has been committed.

Thanks
--Rich

commit dd536e1212d9008a182627b6333d69b2f8c1c393

Author: Eric Sandeen <[email protected]>
Date:   Fri Oct 18 17:57:37 2013 +0000
Quoted 6 lines

xfsprogs: Note projid32bit default change in mkfs.xfs manpage

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs