Messages in this thread | | | Subject | [demo] Re: dir hardlinks (was: Re: fsync on large files) | Date | Sun, 07 Mar 1999 02:05:35 +0100 | From | Ulrich Schmid <> |
| |
Hi,
I played with an algorithm to avoid cycles when hardlinking directories. Attached is an userland demo.
Drawbacks: - Each ancestor of the target directory must be accessed. - It malloc's an additional piece of memory per ancestor
Advantages: - It locks only one ancestor at a time - All locks are released after each processed ancestor - It uses it's own directory-specific lock. So it will not conflict with an ordinary directory lookup. - It's non-recursive
Ulrich Schmid
[unhandled content-type:application/x-gzip ] | |