How discard generally work:
consider a logical volume (lv) of a thin pool.
Once created a lv, the allocated spaced is 0.
I create a filesystem on in (i.e. ext4), add some data till it allocates 5G.
I remove 2G of files but the allocated space is still 5G.
By fstrim, it will de-allocate/discard...