repair: Set ftype for entries in lost+found
PATCH 1/1 repair: Set ftype for entries in lost+found
So far all entries in lost+found had file type XFS_DIR3_FT_UNKNOWN which is somewhat annoying as the next xfs_repair pass will find these and report as an error. Set proper file type when creating these entries.
Signed-off-by Jan Kara <[email protected]>
--- repair/phase6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
repair/phase6.c +2 -2
@@ -1097,8 +1097,6 @@ 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)
@@ -1117,6 +1115,8 @@ mv_orphanage(if ((err =libxfs_iget (mp,NULL , ino,0 , &ino_p,0 )))do_error (_ ("%d - couldn't iget disconnected inode\n" ), err); + xname.type = xfs_mode_to_ftype[(ino_p->i_d.di_mode &S_IFMT )>>S_SHIFT ]; +if (isa_dir) { irec =find_inode_rec (mp,XFS_INO_TO_AGNO (mp, orphanage_ino),XFS_INO_TO_AGINO (mp, orphanage_ino));
Signature · 6 lines
1.8.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · Jan Kara
So far all entries in lost+found had file type
XFS_DIR3_FT_UNKNOWNwhich is somewhat annoying as the nextxfs_repairpass will find these and report as an error. Set proper file type when creating these entries.Signed-off-by Jan Kara <[email protected]>---
Reviewed-by Brian Foster <[email protected]>
Quoted 32 lines
repair/phase6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)repair/phase6.c +2
-2@@ -1097,8 +1097,6 @@ 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)@@ -1117,6 +1115,8 @@ mv_orphanage(if ((err =libxfs_iget (mp,NULL , ino,0 , &ino_p,0 )))do_error (_ ("%d - couldn't iget disconnected inode\n" ), err); + xname.type = xfs_mode_to_ftype[(ino_p->i_d.di_mode &S_IFMT )>>S_SHIFT ]; +if (isa_dir) { irec =find_inode_rec (mp,XFS_INO_TO_AGNO (mp, orphanage_ino),XFS_INO_TO_AGINO (mp, orphanage_ino));Signature · 6 lines
1.8.1.4 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs