On Sun 06 Mar 2011, Dale Amon wrote: > > Oh futz. Hard links don't allow a new directory entry with different > metadata. I had not thought that all the way through.
I get a sense of misunderstanding here about how files, directories and inodes really work, so I'll volunteer some info now :) An inode is a data structure that stores meta information about a "file" (using "file" here in its broadest sense - it can be a regular file, a directory, a device node, a named pipe, etc.). The inode stores the owner/group/permissions/timestamps, as well as the type of file it is, and where appropriate also has info on how to find the data blocks. A directory is a data structure that contains pointers to inodes. More than one pointer to a given inode may exist, that's what hard links are. The owner/group/permissions aren't stored in the directory; basically all a directory is, is a name to inode mapping. So to have the same file contents with two different sets of metadata on a filesystem, the data needs to be duplicated. (For simplicity I ignore copy-on-write filesystems here, as that introduces a complete new layer of information to the filesystem.) Paul _______________________________________________ Dirvish mailing list [email protected] http://www.dirvish.org/mailman/listinfo/dirvish
