Re: [PATCH v3 1/2] btrfs: Enhance btrfs_trim_fs function to handle error better

2018-09-10 Thread David Sterba
On Wed, Aug 29, 2018 at 05:40:12PM +0300, Nikolay Borisov wrote: > > > On 29.08.2018 16:53, Qu Wenruo wrote: > > > > > > On 2018/8/29 下午9:43, Nikolay Borisov wrote: > >> > >> > >> On 29.08.2018 08:15, Qu Wenruo wrote: > >>> Function btrfs_trim_fs() doesn't handle errors in a consistent way, if

Re: [PATCH v3 1/2] btrfs: Enhance btrfs_trim_fs function to handle error better

2018-08-29 Thread Nikolay Borisov
On 29.08.2018 16:53, Qu Wenruo wrote: > > > On 2018/8/29 下午9:43, Nikolay Borisov wrote: >> >> >> On 29.08.2018 08:15, Qu Wenruo wrote: >>> Function btrfs_trim_fs() doesn't handle errors in a consistent way, if >>> error happens when trimming existing block groups, it will skip the >>>

Re: [PATCH v3 1/2] btrfs: Enhance btrfs_trim_fs function to handle error better

2018-08-29 Thread Qu Wenruo
On 2018/8/29 下午9:43, Nikolay Borisov wrote: > > > On 29.08.2018 08:15, Qu Wenruo wrote: >> Function btrfs_trim_fs() doesn't handle errors in a consistent way, if >> error happens when trimming existing block groups, it will skip the >> remaining blocks and continue to trim unallocated space

Re: [PATCH v3 1/2] btrfs: Enhance btrfs_trim_fs function to handle error better

2018-08-29 Thread Nikolay Borisov
On 29.08.2018 08:15, Qu Wenruo wrote: > Function btrfs_trim_fs() doesn't handle errors in a consistent way, if > error happens when trimming existing block groups, it will skip the > remaining blocks and continue to trim unallocated space for each device. > > And the return value will only

[PATCH v3 1/2] btrfs: Enhance btrfs_trim_fs function to handle error better

2018-08-28 Thread Qu Wenruo
Function btrfs_trim_fs() doesn't handle errors in a consistent way, if error happens when trimming existing block groups, it will skip the remaining blocks and continue to trim unallocated space for each device. And the return value will only reflect the final error from device trimming. This