[lkml]   [2003]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: FS: hardlinks on directories
Stephan von Krawczynski <> writes:

> All that can handle symlinks already have the same problem
> nowadays. Where is the difference?

lstat() will tell you if a file is a symlink; if you only walk into
directories, then you're guaranteed not to get into a loop. If you've
got two hardlinks to a directory, how do you make that available in
stat() output, and how does a tree-walking program know which to walk
into? You could do the rsync trick of keeping track of every
device-inode pair you've seen to detect hardlinks, but that's horribly
non-space-efficient on large directories -- particularly bad for

I could imagine this functionality maybe being useful for system
administrators, but with normal Unixish userspace, it doesn't strike
me as a good idea to give users the ability to create hardlinks to

Adam Sampson <> <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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