On Mon, Jul 01, 2024 at 06:04:41PM -0700, Darrick J. Wong wrote: > Add a new -o fstrim_pct= option to xfs_scrub just in case there are > users out there who want a different percentage. For example, accepting > a 95% trim would net us a speed increase of nearly two orders of > magnitude, ignoring system call overhead. Setting it to 100% will trim > everything, just like fstrim(8). It might also make sense to default the parameter to the discard_granularity reported in sysfs. While a lot of devices don't report a useful value there, it avoids pointless work for those that do. Otherwise this looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>