]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: use custom ifork verifier in mv_orphanage
authorEric Sandeen <sandeen@redhat.com>
Tue, 27 Mar 2018 02:27:28 +0000 (21:27 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 27 Mar 2018 02:27:28 +0000 (21:27 -0500)
Now that we have a custom verifier which can ignore parent
inode numbers, use it in mv_orphanage() as well; orphan inodes
may have invalid parents, and we're about to reconnect
them anyway, so override that test when we get them off disk.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase6.c

index ed005e8cc69969093c71a8a8dd3d82a828781ce2..498a3b554c6aa24f495de64cc026e2b991fdb02b 100644 (file)
@@ -1138,7 +1138,8 @@ mv_orphanage(
                xname.len = snprintf((char *)fname, sizeof(fname), "%llu.%d",
                                        (unsigned long long)ino, ++incr);
 
-       err = -libxfs_iget(mp, NULL, ino, 0, &ino_p, &xfs_default_ifork_ops);
+       /* Orphans may not have a proper parent, so use custom ops here */
+       err = -libxfs_iget(mp, NULL, ino, 0, &ino_p, &phase6_ifork_ops);
        if (err)
                do_error(_("%d - couldn't iget disconnected inode\n"), err);