Re: [PATCH 2/5] btrfs: Refactor btrfs_can_relocate

2018-12-04 Thread David Sterba
On Tue, Dec 04, 2018 at 08:34:15AM +0200, Nikolay Borisov wrote: > > > On 3.12.18 г. 19:25 ч., David Sterba wrote: > > On Sat, Nov 17, 2018 at 09:29:27AM +0800, Anand Jain wrote: > >>> - ret = find_free_dev_extent(trans, device, min_free, > >>> -

Re: [PATCH 2/5] btrfs: Refactor btrfs_can_relocate

2018-12-03 Thread Nikolay Borisov
On 3.12.18 г. 19:25 ч., David Sterba wrote: > On Sat, Nov 17, 2018 at 09:29:27AM +0800, Anand Jain wrote: >>> - ret = find_free_dev_extent(trans, device, min_free, >>> - _offset, NULL); >>> - if (!ret) >>> +

Re: [PATCH 2/5] btrfs: Refactor btrfs_can_relocate

2018-12-03 Thread David Sterba
On Sat, Nov 17, 2018 at 09:29:27AM +0800, Anand Jain wrote: > > - ret = find_free_dev_extent(trans, device, min_free, > > - _offset, NULL); > > - if (!ret) > > + if (!find_free_dev_extent(trans,

Re: [PATCH 2/5] btrfs: Refactor btrfs_can_relocate

2018-11-16 Thread Anand Jain
On 10/26/2018 07:43 PM, Nikolay Borisov wrote: btrfs_can_relocate returns 0 when it concludes the given chunk can be relocated and -1 otherwise. Since this function is used as a predicated and it return a binary value it makes no sense to have it's return value as an int so change it to bool.

Re: [PATCH 2/5] btrfs: Refactor btrfs_can_relocate

2018-10-26 Thread Qu Wenruo
On 2018/10/26 下午7:43, Nikolay Borisov wrote: > btrfs_can_relocate returns 0 when it concludes the given chunk can be > relocated and -1 otherwise. Since this function is used as a predicated > and it return a binary value it makes no sense to have it's return > value as an int so change it to

[PATCH 2/5] btrfs: Refactor btrfs_can_relocate

2018-10-26 Thread Nikolay Borisov
btrfs_can_relocate returns 0 when it concludes the given chunk can be relocated and -1 otherwise. Since this function is used as a predicated and it return a binary value it makes no sense to have it's return value as an int so change it to bool. Furthermore, remove a stale leftover comment from