Re: [PATCH] Btrfs: fix race setting up and completing qgroup rescan workers

2019-09-24 Thread David Sterba
On Tue, Sep 24, 2019 at 10:49:54AM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > There is a race between setting up a qgroup rescan worker and completing > a qgroup rescan worker that can lead to callers of the qgroup rescan wait > ioctl to either not wait for the rescan worker to c

Re: [PATCH] Btrfs: fix race setting up and completing qgroup rescan workers

2019-09-24 Thread Josef Bacik
On Tue, Sep 24, 2019 at 03:12:56PM +0100, Filipe Manana wrote: > On Tue, Sep 24, 2019 at 2:53 PM Josef Bacik wrote: > > > > On Tue, Sep 24, 2019 at 10:49:54AM +0100, fdman...@kernel.org wrote: > > > From: Filipe Manana > > > > > > There is a race between setting up a qgroup rescan worker and comp

Re: [PATCH] Btrfs: fix race setting up and completing qgroup rescan workers

2019-09-24 Thread Filipe Manana
On Tue, Sep 24, 2019 at 3:07 PM Nikolay Borisov wrote: > > > > On 24.09.19 г. 12:49 ч., fdman...@kernel.org wrote: > > From: Filipe Manana > > > > There is a race between setting up a qgroup rescan worker and completing > > a qgroup rescan worker that can lead to callers of the qgroup rescan wait

Re: [PATCH] Btrfs: fix race setting up and completing qgroup rescan workers

2019-09-24 Thread Filipe Manana
On Tue, Sep 24, 2019 at 2:53 PM Josef Bacik wrote: > > On Tue, Sep 24, 2019 at 10:49:54AM +0100, fdman...@kernel.org wrote: > > From: Filipe Manana > > > > There is a race between setting up a qgroup rescan worker and completing > > a qgroup rescan worker that can lead to callers of the qgroup re

Re: [PATCH] Btrfs: fix race setting up and completing qgroup rescan workers

2019-09-24 Thread Nikolay Borisov
On 24.09.19 г. 12:49 ч., fdman...@kernel.org wrote: > From: Filipe Manana > > There is a race between setting up a qgroup rescan worker and completing > a qgroup rescan worker that can lead to callers of the qgroup rescan wait > ioctl to either not wait for the rescan worker to complete or to

Re: [PATCH] Btrfs: fix race setting up and completing qgroup rescan workers

2019-09-24 Thread Josef Bacik
On Tue, Sep 24, 2019 at 10:49:54AM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > There is a race between setting up a qgroup rescan worker and completing > a qgroup rescan worker that can lead to callers of the qgroup rescan wait > ioctl to either not wait for the rescan worker to c

[PATCH] Btrfs: fix race setting up and completing qgroup rescan workers

2019-09-24 Thread fdmanana
From: Filipe Manana There is a race between setting up a qgroup rescan worker and completing a qgroup rescan worker that can lead to callers of the qgroup rescan wait ioctl to either not wait for the rescan worker to complete or to hang forever due to missing wake ups. The following diagram shows