# Re: \[dm-devel\] \[PATCH v2 1/1\] block: fix blk\_queue\_split() resource exhaustion

- From: Jack Wang \<hidden\>
- Date: 2017-01-02 14:33:06 
- List: linux-raid
- Page: https://ratatoskr.run/linux-raid/2017/01/4902583
- Thread: https://ratatoskr.run/linux-block/2016/07/4791095/t.md

```text
2016-12-23 12:45 GMT+01:00 Lars Ellenberg [ref]:
> On Fri, Dec 23, 2016 at 09:49:53AM +0100, Michael Wang wrote:
>> Dear Maintainers
>>
>> I'd like to ask for the status of this patch since we hit the
>> issue too during our testing on md raid1.
>>
>> Split remainder bio_A was queued ahead, following by bio_B for
>> lower device, at this moment raid start freezing, the loop take
>> out bio_A firstly and deliver it, which will hung since raid is
>> freezing, while the freezing never end since it waiting for
>> bio_B to finish, and bio_B is still on the queue, waiting for
>> bio_A to finish...
>>
>> We're looking for a good solution and we found this patch
>> already progressed a lot, but we can't find it on linux-next,
>> so we'd like to ask are we still planning to have this fix
>> in upstream?
>
> I don't see why not, I'd even like to have it in older kernels,
> but did not have the time and energy to push it.
>
> Thanks for the bump.
>
>         Lars
>
Hi folks,

As Michael mentioned, we hit a bug this patch is trying to fix.
Neil suggested another way to fix it.  I attached below.
I personal prefer Neil's version as it's less code change, and straight forward.

Could you share your comments, we can get one fix into mainline.

Thanks,
Jinpu
```

## Attachments

- [0001-block-fix-deadlock-between-freeze\_array-and-wait\_bar.patch](https://ratatoskr.run/linux-raid/2017/01/4902583/attachment/0) (text/x-patch, 2366 bytes)
