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