CatalogSearch - how to find hard links?
CatalogSearch - how to find hard links?
- Subject: CatalogSearch - how to find hard links?
- From: Thomas Tempelmann <email@hidden>
- Date: Fri, 25 Apr 2008 18:59:25 +0200
- Thread-topic: CatalogSearch - how to find hard links?
I like to find all hard links on a disk (time machine backup volumes, in
particular).
Assuming that FSCatalogSearch is the fastest method to scan an entire
volume, I simply called it with the FSSearchParams all set to zero, and
asking for the nodeIDs from FSCatalogInfo.
Trouble is that it only finds about 4.2 million items out of about 5.4
million items on the volume (I get this number from Disk Utility, which is
likely the number stored in the volume header). Putting all found nodeIDs
into a hash map, I received no duplicate nodeIDs.
Somehow I had hoped to get all 5.4m items, many of which would have been
hard links, identifyable by their nodeIDs. But apparently this does not work
this way.
I suspect that each hard link is still a unique entry in the catalog BTree,
with its unique nodeID. Hence I get not duplicate nodeIDs. But why do I then
miss so many items? The volume was not altered during the search, and the
effect is missing 1.2 million items is repeatable. Somehow, the Catalog
Iterator leaves out a big bunch of directory items.
Can anyone suggest how to use the File Mgr API functions to find all
directory items, and how to identify the hard links, with their destination?
Thomas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden