On 08/19/13 09:31, David Laight wrote:
For defrag I'd have though you'd work from the inode table and treat
directories no different from files.
That's what I'm doing.
I have an additional optimisation step, which tries to move files in the
same directory, so that they are stored contiguously. This can improve
performance, when a whole directory is read. That's why I iterate the
directories. See my mailinglist posting and status update for more details.
It might be worth rewriting directories in order to remove gaps and
possibly put subdirectories first (but you really want the most
frequently
used entries first).
That is exactly my idea. Good point with the most recently used entries
first. But it's hard to find out which are the most recently used files.
I think of storing directory entries first, then the files. But I'm not
sure if this is the best approach.
Anyhow, this step is no official goal, so I don't focus on that now.
When time allows I will implement it. Maybe even after GSoC.