On Fri, Oct 09, 2015 at 12:35:48AM +, Kosuke Tatsukawa wrote:
> This patch removes the call to waitqueue_active() leaving just wake_up()
> behind. This fixes the problem because the call to spin_lock_irqsave()
> in wake_up() will be an ACQUIRE operation.
Either we can switch it to wake_up or
btrfs_bio_counter_sub() seems to be missing a memory barrier which might
cause the waker to not notice the waiter and miss sending a wake_up as
in the following figure.
btrfs_bio_counter_sub btrfs_rm_dev_replace_blocked
Josef Bacik wrote:
> On 10/08/2015 05:35 PM, Kosuke Tatsukawa wrote:
>> btrfs_bio_counter_sub() seems to be missing a memory barrier which might
>> cause the waker to not notice the waiter and miss sending a wake_up as
>> in the following figure.
>>
>> btrfs_bio_counter_sub