in reply to Re: locking over the network
in thread locking over the network

If windows supports hard links ...
To be honest, I thought that the concept of hard links works only within a filesystem. I don't know how Windows does it, but with, for example, Samba, you don't have a node number where you could hard-link to, do you?

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^3: locking over the network
by rowdog (Curate) on Feb 02, 2011 at 01:46 UTC
    To be honest, I thought that the concept of hard links works only within a filesystem.

    Yes, that's my understanding as well, which is why my example does its work in the current directory.

    I don't know how Windows does it, but with, for example, Samba, you don't have a node number where you could hard-link to, do you?

    smbclient(1) seems to support hard links but I really can't say whether perl's link command works on a samba mount.

      Perl's link works on an SMB mount of an NTFS volume (for non-ancient versions of Perl and non-ancient Windows operating systems).

      I'd be more worried about getting the link count. That is a surprisingly complex and expensive operation under NTFS, as I understand it. But simplistic testing shows that it works okay using native Win32 Perl and Cygwin Perl to a NTFS volume over SMB.

      - tye        

        Ah, I see now. It sounds like hard links aren't the best solution here. Thanks for clarifying the costs involved.