Solid State/TRIM/Erase free space

While there is the -E flag of newfs to TRIM solid state drives when making a new filesystem, I wonder: would it be possible to add a flag like that to fsck? That way we could TRIM a live filesystem (hopefully in the backgroud).

This would be very helpful for those using SSDs on busy database servers. It would restore the full speed of the SSDs without the need to backup/stop/newfs -E/start/restore cycle that is necessary right now.

This could also double as "zero out free space" application useful for the privacy freaks. (Even or regular old hard drives)

Implementation wise this should not be that hard as fsck must know already which blocks are free, right?

IMHO this could be a great "quick fix" while we wait for UFS2. Not that much new code I hope.

What do you guys think?
 
Back
Top