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/md.h | |
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/md.h')
-rw-r--r-- | drivers/md/md.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/md.h b/drivers/md/md.h index 5ee537135553..d05bab55df4e 100644 --- a/drivers/md/md.h +++ b/drivers/md/md.h | |||
@@ -331,6 +331,8 @@ struct mddev_s | |||
331 | struct attribute_group *to_remove; | 331 | struct attribute_group *to_remove; |
332 | struct plug_handle *plug; /* if used by personality */ | 332 | struct plug_handle *plug; /* if used by personality */ |
333 | 333 | ||
334 | struct bio_set *bio_set; | ||
335 | |||
334 | /* Generic flush handling. | 336 | /* Generic flush handling. |
335 | * The last to finish preflush schedules a worker to submit | 337 | * The last to finish preflush schedules a worker to submit |
336 | * the rest of the request (without the REQ_FLUSH flag). | 338 | * the rest of the request (without the REQ_FLUSH flag). |
@@ -517,4 +519,8 @@ extern void md_rdev_init(mdk_rdev_t *rdev); | |||
517 | 519 | ||
518 | extern void mddev_suspend(mddev_t *mddev); | 520 | extern void mddev_suspend(mddev_t *mddev); |
519 | extern void mddev_resume(mddev_t *mddev); | 521 | extern void mddev_resume(mddev_t *mddev); |
522 | extern struct bio *bio_clone_mddev(struct bio *bio, gfp_t gfp_mask, | ||
523 | mddev_t *mddev); | ||
524 | extern struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs, | ||
525 | mddev_t *mddev); | ||
520 | #endif /* _MD_MD_H */ | 526 | #endif /* _MD_MD_H */ |