Re: bug caused by removal of trans_mutex? (Was: Re: kernel BUG at fs/btrfs/extent-tree.c:6164!)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yan, Zheng wrote:
> On Tue, Jun 14, 2011 at 3:55 AM, Chris Mason <chris.mason@xxxxxxxxxx> wrote:
>> Excerpts from Yan, Zheng's message of 2011-06-13 10:58:35 -0400:
>>> The usage of trans_mutex in relocation code is subtle. It controls
>>> interaction of relocation
>>> with transaction start, transaction commit and snapshot creation.
>>> Simple replacing
>>> trans_mutex with trans_lock is wrong.
>>
>> So, I've got a mutex around the reloc_root here and that was almost but
>> not quite enough.  It looks like the biggest problem is that we need to
>> wait in btrfs_record_root_in_trans for anyone inside merge_reloc_roots.
>>
>> I'm surviving much longer with a patch in place that synchronizes
>> btrfs_record_root_in_trans better.
>>
>> Zheng if you have other comments on the locking please let me know.
>>
> 
> following untested patch may help.

I've tested this patch, and the bug was triggered in minutes as usual.

Also I've tested a patch in an offline email from Chris, which survived
the test.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux