Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Omar Sandoval
On Wed, Oct 31, 2018 at 06:40:29PM +0200, Nikolay Borisov wrote: > > > On 31.10.18 г. 18:35 ч., Omar Sandoval wrote: > > On Wed, Oct 31, 2018 at 10:43:02AM +0200, Nikolay Borisov wrote: > >> > >> > >> On 31.10.18 г. 2:14 ч., Omar Sandoval wrote: > >>> From: Omar Sandoval > >>> > >>> There's a

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Nikolay Borisov
On 31.10.18 г. 18:35 ч., Omar Sandoval wrote: > On Wed, Oct 31, 2018 at 10:43:02AM +0200, Nikolay Borisov wrote: >> >> >> On 31.10.18 г. 2:14 ч., Omar Sandoval wrote: >>> From: Omar Sandoval >>> >>> There's a race between close_ctree() and cleaner_kthread(). >>> close_ctree() sets

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Omar Sandoval
On Wed, Oct 31, 2018 at 03:41:47PM +0800, Lu Fengqi wrote: > On Tue, Oct 30, 2018 at 05:14:42PM -0700, Omar Sandoval wrote: > >From: Omar Sandoval > > > >There's a race between close_ctree() and cleaner_kthread(). > >close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it > >sees it

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Omar Sandoval
On Wed, Oct 31, 2018 at 10:43:02AM +0200, Nikolay Borisov wrote: > > > On 31.10.18 г. 2:14 ч., Omar Sandoval wrote: > > From: Omar Sandoval > > > > There's a race between close_ctree() and cleaner_kthread(). > > close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it > > sees it

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Nikolay Borisov
On 31.10.18 г. 2:14 ч., Omar Sandoval wrote: > From: Omar Sandoval > > There's a race between close_ctree() and cleaner_kthread(). > close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it > sees it set, but this is racy; the cleaner might have already checked > the bit and could

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Nikolay Borisov
On 31.10.18 г. 10:26 ч., Nikolay Borisov wrote: > > > On 31.10.18 г. 9:14 ч., Lu Fengqi wrote: >> On Tue, Oct 30, 2018 at 05:14:42PM -0700, Omar Sandoval wrote: >>> From: Omar Sandoval >>> >>> There's a race between close_ctree() and cleaner_kthread(). >>> close_ctree() sets

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Nikolay Borisov
On 31.10.18 г. 9:14 ч., Lu Fengqi wrote: > On Tue, Oct 30, 2018 at 05:14:42PM -0700, Omar Sandoval wrote: >> From: Omar Sandoval >> >> There's a race between close_ctree() and cleaner_kthread(). >> close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it >> sees it set, but this is

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Lu Fengqi
On Tue, Oct 30, 2018 at 05:14:42PM -0700, Omar Sandoval wrote: >From: Omar Sandoval > >There's a race between close_ctree() and cleaner_kthread(). >close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it >sees it set, but this is racy; the cleaner might have already checked >the bit

Re: [PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-31 Thread Lu Fengqi
On Tue, Oct 30, 2018 at 05:14:42PM -0700, Omar Sandoval wrote: >From: Omar Sandoval > >There's a race between close_ctree() and cleaner_kthread(). >close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it >sees it set, but this is racy; the cleaner might have already checked >the bit

[PATCH] Btrfs: fix missing delayed iputs on unmount

2018-10-30 Thread Omar Sandoval
From: Omar Sandoval There's a race between close_ctree() and cleaner_kthread(). close_ctree() sets btrfs_fs_closing(), and the cleaner stops when it sees it set, but this is racy; the cleaner might have already checked the bit and could be cleaning stuff. In particular, if it deletes unused