ZFS must support POSIX semantics, part of which is hard links. Hard
links allow you to create multiple names (directory entries) for the
same file. Therefore, all UNIX filesystems have chosen to store the
file information separately for the directory entries (otherwise, you'd
have multiple copies, and need pointers between all of them so you could
update them all -- yuck).

For what it's worth, some file systems have chosen to special-case hard links
because they are rare and the directory/inode split hurts performance.  Apple's
HFS is a case in point.  The file metadata ("inode") is part of the directory 
entry,
so that no additional disk access is required to retrieve it.  If the file is a 
hard
link, this metadata is a pointer to the shared metadata for the file.

Yes, Microsoft's FAT does it the same way - the dirent is the inode.

This creates locking nightmares in its own right - directory scans/updates may be blocking file access; at the very least, the two race. It might have advantages in some situations, and simplifies the metadata implementation - but at least to me, it also causes headaches ... and an upset stomach every now and then ...


FrankH.
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to