Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HFS+ reusable node ID's



In article
<email@hidden>, John
Siracusa <email@hidden> wrote:

> How does this change affect the use of HFS+ node IDs as unique,
> path-independent identifiers?

No two existing files or directories will have the same node ID at the
same time. If you're storing away node IDs for objects that have since
been deleted, you might get confused if you see the same ID get reused
later for a new object (especially if one was a file and the other a
directory).

In the current implementation, the node IDs are assigned in a circular
fashion. The "next ID" is also persistent across reboots. So, a node
ID is not likely to get reused unless the previous object has been
deleted for quite a while (since the next ID would have to wrap
completely around the 4+ billion ID space).

Note that it is possible to construct scenarios where a node ID is
reused immediately, when you happen to delete an object whose ID
happens to be the next value that will be used.

-Mark




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.