Hi Darrick, On Wed, Apr 10, 2019 at 05:42:28PM +0900, Wang Shilong wrote: > From: Wang Shilong <wshilong@xxxxxxx> > > This patch tries to address two problems: > > 1) return @minlen we used to trim to > user space. > > 2) return EINVAL if granularity is larger than > avg size, even most of cases, granularity is small(4K), > but if devices return a lager granularity for some reaons > (testing, bugs etc), fstrim should return failure directly. It really is a pity^W^Wannoying that there's no manual page for FITRIM, because I have no idea if this is the right or desired behavior for this ioctl. Do the other filesystems update @minlen so that userspace knows the granularity? --D ---------> As far as I checked ext4, f2fs, Btrfs did so, I think it makes sense we return this value to userspace, we'd better to doc it somewhere 'man fstrim'? thanks, Shilong