tag name | repair-orphanage_2022-10-14 (be3eb935a420a1a8a2115d466c3da50dd2c4b59a) |
tag date | 2022-10-14 14:19:02 -0700 |
tagged by | Darrick J. Wong <djwong@kernel.org> |
tagged object | commit 9678c9e283... |
xfs: move orphan files to lost and found
Orphaned files are defined to be files with nonzero ondisk link count
but no observable parent directory. This series enables online repair
to reparent orphaned files into the filesystem directory tree, and wires
up this reparenting ability into the directory, file link count, and
parent pointer repair functions. This is how we fix files with positive
link count that are not reachable through the directory tree.
This patch will also create the orphanage directory (lost+found) if it
is not present. In contrast to xfs_repair, we follow e2fsck in creating
the lost+found without group or other-owner access to avoid accidental
disclosure of files that were previously hidden by an 0700 directory.
That's silly security, but people have been known to do it.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmNJ0kYACgkQ+H93GTRK
tOv1IhAAmHckV2FRXoRzJHYoTPJfEb4C8gkUVFqmvkiVX5YziuwuJaMbAuvbVDqp
JK+1rRcOhtg5Lxh9EyzfWKKw1evBsyUBhCH7Dql7xbmwvHvRsRPjNAF+WY6MPkws
HjhddwNXtUeUSgKzfRrjyhdu0UuynO9TVSnxsbVZEd0pSEfaYebE6cZBL7sL4VmN
YrUYGEtbo9eMtKFNHHqzhQdC2bhbtwhNeh/Z9EE2Vo16ydR42DhrRGtinC/pR6W5
axKwyDWvdUhnnlIKgZaeWJAmdIouUY9dsxFHysNNCWS4oMDPgzuChZjnADQ7AQNo
Hk1txl+8MtyT15Cxv0uxoPCISoslJ1B1OZeQzgxC/u+nvR73UhivAoBmLSSlIL+M
qiqNRLOxUpynS3wUPPymfhGeF3HODNMxEzgqikFJZ3sLJYUDWZil5JsEz8uxEUZ1
fSXtbcGACnifk7jvEfjtEFaKwL757AE3h3Ella+MSzNMJDT+syR8Dpnfwb/v/h5Y
rhNthG3t1pNPNdeWDToez2XOLizxlajzJ2wdWPvJHet0MHxHa2QaOmIbvSrFHQkl
iJsb/8Kl8Y9spK1zEaCZBTVL59XQmWkt6Iz2tFQi37fAy1qokIcnjhxuEKooUCZL
UO2C0zehKPF20cbZSXNp8y/zQQZJFEqbjqJ0o1aKp5Nh1Uy+peA=
=IYyA
-----END PGP SIGNATURE-----