lkml.org 
[lkml]   [1999]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject[demo] Re: dir hardlinks (was: Re: fsync on large files)
Date
From
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 ]
\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.027 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site