diff options
author | NeilBrown <neilb@suse.de> | 2010-10-26 03:31:13 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-10-28 02:36:15 -0400 |
commit | a167f663243662aa9153c01086580a11cde9ffdc (patch) | |
tree | 886e64787421bbf17a1eab7853d67258b598f050 /drivers/md/faulty.c | |
parent | 2b193363ef68667ad717a6723165e0dccf99470f (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/faulty.c')
-rw-r--r-- | drivers/md/faulty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 1a8987884614..339fdc670751 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c | |||
@@ -210,7 +210,7 @@ static int make_request(mddev_t *mddev, struct bio *bio) | |||
210 | } | 210 | } |
211 | } | 211 | } |
212 | if (failit) { | 212 | if (failit) { |
213 | struct bio *b = bio_clone(bio, GFP_NOIO); | 213 | struct bio *b = bio_clone_mddev(bio, GFP_NOIO, mddev); |
214 | b->bi_bdev = conf->rdev->bdev; | 214 | b->bi_bdev = conf->rdev->bdev; |
215 | b->bi_private = bio; | 215 | b->bi_private = bio; |
216 | b->bi_end_io = faulty_fail; | 216 | b->bi_end_io = faulty_fail; |