Re: [PATCH] Btrfs: skip setting path to blocking mode if balance is not needed

2018-09-14 Thread David Sterba
On Wed, Sep 12, 2018 at 09:51:33AM +0300, Nikolay Borisov wrote: > > > On 12.09.2018 01:06, Liu Bo wrote: > > balance_level() may return early in some cases, but these checks don't > > have to be done with blocking write lock. > > > > This puts together these checks into a helper and the benefit

Re: [PATCH] Btrfs: skip setting path to blocking mode if balance is not needed

2018-09-11 Thread Nikolay Borisov
On 12.09.2018 01:06, Liu Bo wrote: > balance_level() may return early in some cases, but these checks don't > have to be done with blocking write lock. > > This puts together these checks into a helper and the benefit is to > avoid switching spinning locks to blocking locks (in these paticular

[PATCH] Btrfs: skip setting path to blocking mode if balance is not needed

2018-09-11 Thread Liu Bo
balance_level() may return early in some cases, but these checks don't have to be done with blocking write lock. This puts together these checks into a helper and the benefit is to avoid switching spinning locks to blocking locks (in these paticular cases) which slows down btrfs overall. Signed-o