Why does ZFS report such small directory sizes?  For example, take a maildir 
directory with ten entries:

total 2385
drwx------   8 17121    vmail         10 Jun  8 23:50 .
drwx--x--x  14 root     root          14 May 12  2006 ..
drwx------   5 17121    vmail          5 May 25 18:16 .Trash
drwx------   5 17121    staff          6 Jun  9 00:01 .testing
-rw-------   1 17121    staff          0 Jun  8 18:30 .uidvalidity
drwx------   2 17121    root           2 Jun  6 19:33 courierimapkeywords
-rw-r--r--   1 17121    root      219951 Jun  8 18:29 courierimapuiddb
drwx------   2 17121    vmail       6144 Jun  9 09:59 cur
drwx------   2 17121    vmail          3 Jun  9 12:09 new
drwx------   2 17121    vmail          2 Jun  9 12:09 tmp

Note how ".", this directory, is only 10 bytes long.  Only one byte per 
directory entry?  This confuses programs that assume that the st_size reported 
for a directory is a multiple of sizeof(struct dirent) bytes.
 
 
This message posted from opensolaris.org
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to