Re: [PATCH v4 01/15] btrfs: Honour FITRIM range constraints during free space trim

2019-05-24 Thread Qu Wenruo
On 2019/3/27 下午8:24, Nikolay Borisov wrote: > Up until know trimming the freespace was done irrespective of what the > arguments of the FITRIM ioctl were. Since commit 6ba9fc8e628b ("btrfs: Ensure btrfs_trim_fs can trim the whole filesystem"), btrfs in fact follows the range parameter. It inte

[PATCH v4 01/15] btrfs: Honour FITRIM range constraints during free space trim

2019-03-27 Thread Nikolay Borisov
Up until know trimming the freespace was done irrespective of what the arguments of the FITRIM ioctl were. For example fstrim's -o/-l arguments will be entirely ignored. Fix it by correctly handling those paramter. This requires breaking if the found freespace extent is after the end of the passed