ZFS directory with a large number of files
daniel at digsys.bg
Mon Aug 8 11:11:29 UTC 2011
On 06.08.11 09:24, Gary Palmer wrote:
> Its been quite a while since I worked on the filesystem stuff in any
> detail but I believe, at least for UFS, it doesn't GC the directory,
> just truncate it if enough of the entries at the end are deleted to
> free up at least one fragment or block.
This was my point indeed. If you empty a directory or remove files form
the end of the directory is it truncated, this is not really a GC, but
rather a shortcut. I guess the reason why it does not use GC is because
of concurrency/locking reasons. Or maybe the code was just not written yet.
But with ZFS this should be much easier to implement. If it is the same
in Solaris, then it is not done so far... But then, the promise made by
ZFS is to provide constant directory access timing.
I am just wondering.. does implementing such garbage collection merit a
new ZFS filesystem version?
More information about the freebsd-stable