aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-10-26 03:31:13 -0400
committerNeilBrown <neilb@suse.de>2010-10-28 02:36:15 -0400
commita167f663243662aa9153c01086580a11cde9ffdc (patch)
tree886e64787421bbf17a1eab7853d67258b598f050 /drivers/md/raid5.c
parent2b193363ef68667ad717a6723165e0dccf99470f (diff)
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>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 8abc159b377a..dc574f303f8b 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3876,9 +3876,9 @@ static int chunk_aligned_read(mddev_t *mddev, struct bio * raid_bio)
3876 return 0; 3876 return 0;
3877 } 3877 }
3878 /* 3878 /*
3879 * use bio_clone to make a copy of the bio 3879 * use bio_clone_mddev to make a copy of the bio
3880 */ 3880 */
3881 align_bi = bio_clone(raid_bio, GFP_NOIO); 3881 align_bi = bio_clone_mddev(raid_bio, GFP_NOIO, mddev);
3882 if (!align_bi) 3882 if (!align_bi)
3883 return 0; 3883 return 0;
3884 /* 3884 /*