[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reading an empty directory after reboot is very slow

On 2015-04-15 12:29:49 +0530, Kushal Kumaran wrote:
> Moving entries around breaks ongoing readdir operations.  If a readdir
> has gone past the file being removed, and you moved the last entry
> there, the entry being moved would be missed, despite *it* not being the
> entry added or removed.


I have an alternative proposition: Add a counter to each block in
order to count the non-free entries. When the counter reaches 0,
the block can be removed from the directory. This would allow the
directory to shrink when all or almost all the files are removed.

Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply to: