Description of problem: To ensure that blocks freed by deleting a thin pool LV are discarded, one must run blkdiscard on the thin pool LV before deleting it. This is slow and unreliable. Instead, LVM could run thin_trim on the metadata and data LVs before activating the pool. This would automatically discard all blocks in the pool that are no longer needed. Version-Release number of selected component (if applicable): This feature has not been implemented in any version of LVM2 to date. How reproducible: 100% Steps to Reproduce: 1. Have a system where thin pool LVs are frequently created and destroyed. 2. Try to figure out how to ensure that blocks used only by to-be-destroyed thin pool LVs are discarded. Actual results: There is no solution better than running blkdiscard on the LV before removing it, which is slow, unreliable, and interferes with other I/O unless manually chunked. Expected results: LVM2 can be configured to run thin_trim before activating the pool, automatically discarding the unneeded blocks. Additional info: Linux currently implements on a thin pool LV inefficiently, which is one reason that this is a problem in practice.
This is likely to be significant for those who use LVM thin provisioning on top of VDO, as VDO is itself a form of thin provisioning and requires discards to be passed down from upper layers.