md: use separate bio pool for each md device.

bio_clone and bio_alloc allocate from a common bio pool.
If an md device is stacked with other devices that use this pool, or under
something like swap which uses the pool, then the multiple calls on
the pool can cause deadlocks.

So allocate a local bio pool for each md array and use that rather
than the common pool.

This pool is used both for regular IO and metadata updates.

Signed-off-by: NeilBrown <neilb@suse.de>
Šī revīzija ir iekļauta:
NeilBrown
2010-10-26 18:31:13 +11:00
vecāks 2b193363ef
revīzija a167f66324
6 mainīti faili ar 95 papildinājumiem un 12 dzēšanām

Parādīt failu

@@ -3876,9 +3876,9 @@ static int chunk_aligned_read(mddev_t *mddev, struct bio * raid_bio)
return 0;
}
/*
* use bio_clone to make a copy of the bio
* use bio_clone_mddev to make a copy of the bio
*/
align_bi = bio_clone(raid_bio, GFP_NOIO);
align_bi = bio_clone_mddev(raid_bio, GFP_NOIO, mddev);
if (!align_bi)
return 0;
/*