I am in server.cpp, in the map saving part, at line 246. (is this the right line?, is there a better place?)
What i would like to know is how much space should there be less than to start the gracefull exit?
I think 50 KB is about right.
What is the problem?
the blocks are not saved properly, and so the map generator thinks the block is blank, and so re-generates
Update
I have done a temporary solution, but it might not be enough.https://gist.github.com/3807215/
I would like someone (a developer) to make a fix for the core