On 02/08/2011 11:10, Daniel Kalchev wrote: > Other than that, perhaps in ZFS it would be easier to prune the unused > directory entries, than it is in UFS. It looks like this is not > implemented.
Remember that ZFS uses copy-on-write for all filesystem updates. Any change to a directory contents means the whole directory data is rewritten. In which case, there's no benefit to retaining a large data structure with lots of empty slots (as happened on Unix FSes in the past.) I'd expect, and I see in my (admittedly fairly cursory) testing that ZFS directory data sizes update immediately whenever files are added or removed from the directory. Where this gets interesting is when the directory gets sufficiently large that the directory data is larger than the 128kB block size used by ZFS. As that takes many more files than any sensible person would put into one directory it's possible there's a bug in handling such large structures which is only rarely tickled. But this is all speculation on my behalf, and I have no evidence to back it up. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW
signature.asc
Description: OpenPGP digital signature