>> [...] Many filesystems have a "free list" optimized for the >> forward mapping fast "find a free block", not the reverse >> mapping "check whether a block is free". A good option would >> have been to not do 'fstrim'/'blkdiscard' and put TRIM in >> 'fsck' (apparently that happens under MacOS X and 'e2fsck' >> also allows that). > how often do you reboot at all and then check your filesystems > versus blocks freed /data deleted? System design is all about tradeoffs: in this case between having complicated and subtle code to list unused block segments in the kernel or have it in 'fsck' (which can take weeks to complete...), which must be regularly used to audit the filesystem structure anyhow. I am aware that the opinion that "reboot at all and then check your filesystems" (and presumably other maintenance operations) should be or can be performed rarely is very popular among many sysadmins, being very low cost; to an extreme example I have seen systems in semi production use for which hardware and software went EOL in 2007 and untouched since then, and still "work". But some people get away with it, some don't.