hi Josef
Thanks, I got it. But i still have no idea to reliably reproduce it.
This bug-on is triggered when I ran POSTMARK test lasting two days.
BTW, can you reproduce the bug reported by email with title of "btrfs
hung with iozone test under linux kernel 3.14." The reported bug can
be reliably reproduced in my environment.
2014-04-07 23:50 GMT+08:00 Josef Bacik <jbacik@xxxxxx>:
> On 04/07/2014 11:45 AM, ylet ylet wrote:
>>
>> Assuming thread 1 (may be VFS want to release the page) wants to
>> release a CLEAN page and thus the eb attaching the page.
>> and thread 2 wants to access the eb and cow the eb.
>>
>> Thread 1
>> Thread 2
>>
>> btree_releasepage
>>
>> try_release_extent_buffer
>>
>> release_extent_buffer
>> ->if (atomic_dec_and_test(&eb->refs)) {
>> ->spin_unlock(&eb->refs_lock);
>> -------switch to thread 2 here------
>>
>> read_block_for_search
>>
>> btrfs_find_tree_block
>>
>> radix_tree_lookup && atomic_inc_not_zero
>>
>
> atomic_inc_not_zero would return 0 here because we've dropped the last
> buffer for this, that is how we protect against this problem. How reliably
> are you able to reproduce this bug? Cause I'd love to find it if you can
> reproduce reliably. Thanks,
>
> Josef
--
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