Re: Creating hardlinks for directories.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 16, 2006 at 01:03:02PM +0000, James Wilkinson wrote:
> 
> Please note that the ln command and associated manpage come from the GNU
> project. As such, they are certainly not Linux-specific. I understand
> that many of the GNU utilities pre-date the Linux kernel: they were
> certainly designed to install on a large number of weird and
> less-than-wonderful archaic systems. (And this was common, especially
> on systems which saw a lot of interactive shell use).
> 
> So the "possible way of usage" could include "using GNU ln on a
> different system with a different C library and a different kernel".
> 

That's what got me confused in the begning.

> To the best of my knowledge, this *is* the only way. The e-mail at
> http://lwn.net/Articles/100184/ dates from August 2004, but Linus
> Torvalds explicitly says:
>     The general VFS layer has a lot of rules, and avoids these problems by
>     simply never having aliases between two directories. If the same directory
>     shows up multiple times (which can happen with bind mounts), they have the
>     exact same dentry for the directory, it's just found through two different
>     vfsmount instances. That's why vfsmounts exist - they allow the same name
>     cache entry to show up in different places at the same time.
> 
> In other words, if a directory is hard linked, it's a kernel bug.
> 
> James.

I got it. I think I have a workaround yet. Let's see.

Regards!
-- 
vikram...
         ||||||||
         ||||||||
^^'''''^^||root||^^^'''''''^^
        // \\   ))
       //(( \\// \\
      // /\\ ||   \\
     || / )) ((    \\
-- 
A billion here, a billion there -- pretty soon it adds up to real money.
		-- Sen. Everett Dirksen, on the U.S. defense budget
-- 
 *
~|~
 =
Registered Linux User #285795


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux