exfat icon indicating copy to clipboard operation
exfat copied to clipboard

TRIM support

Open Lekensteyn opened this issue 7 years ago • 4 comments

How easy/difficult would it be to add support for TRIM (discard) on a FS level?

Support for TRIM would require implementing the FITRIM ioctl on the FUSE level. But how to figure out what blocks are free or not? TRIM seems to work on the granularity of blocks, not exFAT clusters.

Possibly helpful information:

  • "[PATCH] Implement FITRIM (fstrim) ioctl." (posted to ntfs-3g-devel by Richard W.M. Jones on 2014-07-07) http://ntfs-3g-devel.sf.narkive.com/CVoHuRGY/patch-implement-fitrim-fstrim-ioctl

Support for this feature could in theory make it easier to implement #45.

Lekensteyn avatar Dec 27 '17 21:12 Lekensteyn

Looks like bmap and ioctl FUSE ops should be implemented for this. Need more research.

But how to figure out what blocks are free or not?

There's clusters bitmap that can quickly tell whether a cluster is occupied or not.

TRIM seems to work on the granularity of blocks, not exFAT clusters.

blocks <-> clusters conversion is not a problem.

relan avatar Jan 09 '18 18:01 relan

If TRIM is per block, then it makes sense to TRIM also individual blocks from partially empty clusters.

akostadinov avatar Feb 05 '18 17:02 akostadinov

Seems like this one can be closed after March 17.

cemeyer avatar Oct 05 '18 03:10 cemeyer

Did this not make it into a release?

gmiranda avatar Apr 09 '21 21:04 gmiranda