aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorNeilBrown2010-10-19 12:54:01 +1100
committerNeilBrown2010-10-28 17:34:07 +1100
commit4e78064f42ad474ce9c31760861f7fb0cfc22532 (patch)
tree3a1abaa98ebcbd62eacfbe95d72e44195fb3bc1f /mm
parente804ac780e2f01cb3b914daca2fd4780d1743db1 (diff)
md: Fix possible deadlock with multiple mempool allocations.
It is not safe to allocate from a mempool while holding an item previously allocated from that mempool as that can deadlock when the mempool is close to exhaustion. So don't use a bio list to collect the bios to write to multiple devices in raid1 and raid10. Instead queue each bio as it becomes available so an unplug will activate all previously allocated bios and so a new bio has a chance of being allocated. This means we must set the 'remaining' count to '1' before submitting any requests, then when all are submitted, decrement 'remaining' and possible handle the write completion at that point. Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com> Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions