> What was the reason to make ZFS use directory sizes as the number of > entries rather than the way other Unix filesystems use it?
In UFS, the st_size is the size of the directory inode as though it were a file. The only reason it's like that is that UFS is sloppy and lets you cat directories -- a fine way to screw up your terminal settings, but otherwise not terribly useful. For reads (rather than readdirs) of a directory to work, st_size has to be this way. With ZFS, we decided to enforce file vs. directory semantics -- no read(2) of directories, no directory hard links (even as root), etc. What, then, should we return for st_size? We figured the number of entries would be the most useful piece of information for a sysadmin. Jeff _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss