Re: [PATCH, RFC] xfs: fix multi-AG deadlock in xfs_bunmapi

Nikolay Borisov
2017-07-19T15:09:33Z

On 19.07.2017 16:11, Nikolay Borisov wrote:
>
>
> On 18.07.2017 20:25, Christoph Hellwig wrote:
>> Just like in the allocator we must avoid touching multiple AGs out of
>> order when freeing blocks, as freeing still locks the AGF and can cause
>> the same AB-BA deadlocks as in the allocation path.
>>
>> Signed-off-by: Christoph Hellwig <hch@lst.d> Reported-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
>
> Unfortunately I this patch is not enough. I just tested on a 3.12 kernel ( the issue was easiest to repro there)
> and I still get stack traces. I will also test on a 4.4-based kernel as well but I assume the results are going to
> be the same.

I can confirm that on 4.4 I also hit the same deadlock. So this patch is
not sufficient.