derFunkenstein wrote:But how does it know if it's marked deleted if it can't read the file system?
That's what TRIM does. If your filesystem doesn't send down TRIM commands, then the drive can only do garbage collection on blocks that aren't full. Of which there are more than you think, because the erase block size is not the same as the write block size, and neither may be the same as what the filesystem considers the minimum unit (sector, cluster, whatever). So in cases where a file gets rewritten, what typically happens is that the SSD writes the new file to new (empty) blocks, and then goes back and erases the blocks containing the old version -- and there's usually some empty space ("slack") left over at the end of the file. It may also do some shuffling of blocks for wear-leveling, so that it swaps blocks that were only written once with blocks that have been written multiple times, possibly doing some consolidation of that slack along the way. All of this happens behind the filesystem's back, which thinks everything is still in the same place. Obviously TRIM improves things because it gives the GC more empty or erasable blocks to work with rather than trying to preserve the blocks containing file contents the filesystem knows to be deleted.