Re: [PATCH 5/6] btrfs: simplify btrfs_select_ref_head and cleanup some local variables

2018-10-14 Thread Lu Fengqi
On Thu, Oct 11, 2018 at 02:45:04PM +0200, David Sterba wrote: >On Thu, Oct 11, 2018 at 03:28:15PM +0300, Nikolay Borisov wrote: >> > I noticed that there is a macro called SCRAMBLE_DELAYED_REFS in the >> > extent-tree.c. I am a bit curious whether it has been forgotten by >> > everyone, I have not

Re: [PATCH 5/6] btrfs: simplify btrfs_select_ref_head and cleanup some local variables

2018-10-14 Thread Lu Fengqi
On Thu, Oct 11, 2018 at 03:28:15PM +0300, Nikolay Borisov wrote: > > >On 11.10.2018 15:15, Lu Fengqi wrote: >> On Thu, Oct 11, 2018 at 09:40:52AM +0300, Nikolay Borisov wrote: >>> >>> >>> On 11.10.2018 08:40, Lu Fengqi wrote: If the return value of find_ref_head() is NULL, the only possibility

Re: [PATCH 5/6] btrfs: simplify btrfs_select_ref_head and cleanup some local variables

2018-10-11 Thread David Sterba
On Thu, Oct 11, 2018 at 03:28:15PM +0300, Nikolay Borisov wrote: > > I noticed that there is a macro called SCRAMBLE_DELAYED_REFS in the > > extent-tree.c. I am a bit curious whether it has been forgotten by > > everyone, I have not found any test results about its performance impact. > > I guess

Re: [PATCH 5/6] btrfs: simplify btrfs_select_ref_head and cleanup some local variables

2018-10-11 Thread Nikolay Borisov
On 11.10.2018 15:15, Lu Fengqi wrote: > On Thu, Oct 11, 2018 at 09:40:52AM +0300, Nikolay Borisov wrote: >> >> >> On 11.10.2018 08:40, Lu Fengqi wrote: >>> If the return value of find_ref_head() is NULL, the only possibility is >>> that delayed_refs' head ref rbtree is empty. Hence, the second >

Re: [PATCH 5/6] btrfs: simplify btrfs_select_ref_head and cleanup some local variables

2018-10-11 Thread Lu Fengqi
On Thu, Oct 11, 2018 at 09:40:52AM +0300, Nikolay Borisov wrote: > > >On 11.10.2018 08:40, Lu Fengqi wrote: >> If the return value of find_ref_head() is NULL, the only possibility is >> that delayed_refs' head ref rbtree is empty. Hence, the second >> find_ref_head() is pointless. >> > Besides, the

Re: [PATCH 5/6] btrfs: simplify btrfs_select_ref_head and cleanup some local variables

2018-10-10 Thread Nikolay Borisov
On 11.10.2018 08:40, Lu Fengqi wrote: > If the return value of find_ref_head() is NULL, the only possibility is > that delayed_refs' head ref rbtree is empty. Hence, the second > find_ref_head() is pointless. > > Besides, the local variables loop and start are unnecessary, just remove > them. S

[PATCH 5/6] btrfs: simplify btrfs_select_ref_head and cleanup some local variables

2018-10-10 Thread Lu Fengqi
If the return value of find_ref_head() is NULL, the only possibility is that delayed_refs' head ref rbtree is empty. Hence, the second find_ref_head() is pointless. Besides, the local variables loop and start are unnecessary, just remove them. Signed-off-by: Lu Fengqi --- fs/btrfs/delayed-ref.c