Re: [PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-05-22 Thread David Sterba
On Wed, May 09, 2012 at 11:24:28AM +0800, Miao Xie wrote: > Did you apply the trylock patchs I sent before? 20120429 [PATCH 1/2] vfs: re-implement writeback_inodes_sb(_nr)_if_idle() and rename them 20120429 [PATCH 2/2] Btrfs: flush all the dirty pages if try_to_writeback_inodes_sb_nr() fails

Re: [PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-05-08 Thread Miao Xie
On Tue, 8 May 2012 17:33:26 +0200, David Sterba wrote: > On Tue, May 08, 2012 at 06:38:01PM +0800, Miao Xie wrote: >> I think this method can not fix the problem safely because if the other >> background threads(not the cleaner) call shrink_delalloc(), the problem >> can still occur. > > And it do

Re: [PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-05-08 Thread David Sterba
On Tue, May 08, 2012 at 06:38:01PM +0800, Miao Xie wrote: > I think this method can not fix the problem safely because if the other > background threads(not the cleaner) call shrink_delalloc(), the problem > can still occur. And it does not indeed fix the problem completely, I found xfstests/269 h

Re: [PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-05-08 Thread Miao Xie
On Mon, 30 Apr 2012 18:41:39 +0200, David Sterba wrote: > On Fri, Apr 27, 2012 at 06:55:13PM +0800, Miao Xie wrote: >> But I found you add a trylock for ->s_umount in cleaner_kthread(), this >> method >> can fix the deadlock problem, I think. It may be introduced by the other >> patch, >> could y

Re: [PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-04-30 Thread David Sterba
On Fri, Apr 27, 2012 at 06:55:13PM +0800, Miao Xie wrote: > But I found you add a trylock for ->s_umount in cleaner_kthread(), this method > can fix the deadlock problem, I think. It may be introduced by the other > patch, > could you send that patch to me? I found if we fail to trylock > ->clean

Re: [PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-04-27 Thread Miao Xie
>> The reason the deadlock is that: >> Task Btrfs-cleaner >> umount() >> down_write(&s->s_umount) >> sync_filesystem() >> do auto-defragment and produce >> lots of dirty page

Re: [PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-04-26 Thread David Sterba
On Thu, Apr 26, 2012 at 10:58:04AM +0800, Miao Xie wrote: > The reason the deadlock is that: > TaskBtrfs-cleaner > umount() > down_write(&s->s_umount) > sync_filesystem() > do auto-defragment and produce >

[PATCH 2/4] Btrfs: fix deadlock on sb->s_umount when doing umount

2012-04-25 Thread Miao Xie
The reason the deadlock is that: Task Btrfs-cleaner umount() down_write(&s->s_umount) sync_filesystem() do auto-defragment and produce lots of dirty pages close_ctree()