Re: [PATCH v3 2/2] btrfs: Ensure btrfs_trim_fs can trim the whole fs

2018-08-29 Thread Nikolay Borisov
On 29.08.2018 08:15, Qu Wenruo wrote: > [BUG] > fstrim on some btrfs only trims the unallocated space, not trimming any > space in existing block groups. > > [CAUSE] > Before fstrim_range passed to btrfs_trim_fs(), it get truncated to > range [0, super->total_bytes). > So later btrfs_trim_fs()

[PATCH v3 2/2] btrfs: Ensure btrfs_trim_fs can trim the whole fs

2018-08-28 Thread Qu Wenruo
[BUG] fstrim on some btrfs only trims the unallocated space, not trimming any space in existing block groups. [CAUSE] Before fstrim_range passed to btrfs_trim_fs(), it get truncated to range [0, super->total_bytes). So later btrfs_trim_fs() will only be able to trim block groups in range [0,