There must be many schemes for not completely deleting files. My main point would be to tag files for deletion, and delete them only as space was needed, in FIFO manner.
I guess I like the idea someone once told me was Novell's way of doing it.
Instead of figuring out how to do it in the current system with all its limitations, I am thinking about expressing it without limitations. Only after the idea is complete, will I try to force it into the current limitations.
It should be easy. I like databases, so imagining the files were in a table, I'd add a field. The field would be a DATE/TIME field, that would mention when it was marked for deletion. A NULL value would mean that it was not marked.
When space was needed, a simple
SELECT Filename, Blocks FROM Files ORDER BY Marked_For_Deletion_Date;
I guess an algorithym could be added, to say that if a second file needs to be deleted to make enough space for the new file, then maybe it is all that is needed (and file 1 can stay).
A feature could be added to add a priority number (weight) to deletion. That is, a person decides a file isn't needed, but wouldn't mind keeping it around just-in-case. That would be the last file to be deleted.
One big issue with this is the need for proper filespace reporting. Most reporting needs to ignore files that were marked for deletion.
Further, should the marked files be removed from the current directory? Maybe a bit could be used to should that it was marked instead? The idea of using a separate directory is bothersome to me.