lkml.org 
[lkml]   [2003]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: FS: hardlinks on directories
Helge Hafting wrote:

>On Tue, Aug 05, 2003 at 03:03:51PM +0200, Stephan von Krawczynski wrote:
>
>
>>On Tue, 05 Aug 2003 14:51:46 +0200
>>Helge Hafting <helgehaf@aitel.hist.no> wrote:
>>
>>
>>
>>>Even more fun is when you have a directory loop like this:
>>>
>>>mkdir A
>>>cd A
>>>mkdir B
>>>cd B
>>>make hard link C back to A
>>>
>>>cd ../..
>>>rmdir A
>>>
>>>You now removed A from your home directory, but the
>>>directory itself did not disappear because it had
>>>another hard link from C in B.
>>>
>>>
>>How about a truly simple idea:
>>
>>rmdir A says "directory in use" and is rejected
>>
>>
>>
>Then anybody can prevent you from removing your obsolete directories
>by creating links to them. Existing hard link don't have
>such problems.
>
>
So, he needs links that count as references, links that don't count as
references but disappear if the object disappears (without dangling like
symlinks), and unlinkall(), which removes an object and all of its
links. He needs for the first reference to a directory to be removable
only by removing all links to the object, or designating another link to
be the "first" reference.

Sounds clean to me. This is not to say that I am funded to write
it.;-) I'd look at a patch though.....;-)

I need to write up a taxonomy of links..... after reiser4 ships.....

--
Hans


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.157 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site