I know this is a bit late, but I thought a bit more information would help...
When a file is "deleted", what actually happens:
1. the entry in the directory is removed, and the directory rewritten (thus requiring write access to the directory).
2. the link count in the file inode is decremented
3. The filesystem supporting the file detects if the link count in the inode is zero (it requires the inode to be overwritten), and if the link count is 0, then the disk blocks of the file (and the metadata) are deallocated, and the inode returned to the free list for reuse.
Sometimes the sequence can be interrupted (power failures/etc). On non-journaling filesystems this will result in a "lost file" - and when an fsck pass is done, the inode is identified as not being in a directory. This situation is repaired by fsck by putting a file name in the "lost+found" file in the filesystems root directory. This rarely happens with a journaling filesystem as the mount will reprocess the journal and commit the outstanding transactions, thus repairing the filesystem.
Interrups can also occur before the data blocks are freed - thus getting errors of "free block not in free list". These are also easily repaired by fsck - it just puts them back in the free list.
Last edited by jpollard; 02-08-2015 at 07:16 AM.