On Tue, 1 April 2008 08:56:45 +0300, Artem Bityutskiy wrote:
Correct. I have a patch that caches this information in RAM, so the
worst-case scenario is to do the full scan once - if the filesystem is
near 100% full and performance is down the drain anyway. The goal is
obviously to store that information on the medium.
And you get the obvious catch-22. When writing out how much free space
exists in which blocks, you occupy some free space in one of those
blocks and obsolete some in another. So by writing the data you have
just written changes and should be written again.
Takes a bit of thought to solve.
So how do you solve the catch-22?
Jörn
--
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.
-- Brian W. Kernighan
--