diff options
Diffstat (limited to 'drivers/md/dm-io.c')
| -rw-r--r-- | drivers/md/dm-io.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index ea49834377c8..2a20986a2fec 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c | |||
| @@ -19,8 +19,6 @@ | |||
| 19 | #define DM_MSG_PREFIX "io" | 19 | #define DM_MSG_PREFIX "io" |
| 20 | 20 | ||
| 21 | #define DM_IO_MAX_REGIONS BITS_PER_LONG | 21 | #define DM_IO_MAX_REGIONS BITS_PER_LONG |
| 22 | #define MIN_IOS 16 | ||
| 23 | #define MIN_BIOS 16 | ||
| 24 | 22 | ||
| 25 | struct dm_io_client { | 23 | struct dm_io_client { |
| 26 | mempool_t *pool; | 24 | mempool_t *pool; |
| @@ -50,16 +48,17 @@ static struct kmem_cache *_dm_io_cache; | |||
| 50 | struct dm_io_client *dm_io_client_create(void) | 48 | struct dm_io_client *dm_io_client_create(void) |
| 51 | { | 49 | { |
| 52 | struct dm_io_client *client; | 50 | struct dm_io_client *client; |
| 51 | unsigned min_ios = dm_get_reserved_bio_based_ios(); | ||
| 53 | 52 | ||
| 54 | client = kmalloc(sizeof(*client), GFP_KERNEL); | 53 | client = kmalloc(sizeof(*client), GFP_KERNEL); |
| 55 | if (!client) | 54 | if (!client) |
| 56 | return ERR_PTR(-ENOMEM); | 55 | return ERR_PTR(-ENOMEM); |
| 57 | 56 | ||
| 58 | client->pool = mempool_create_slab_pool(MIN_IOS, _dm_io_cache); | 57 | client->pool = mempool_create_slab_pool(min_ios, _dm_io_cache); |
| 59 | if (!client->pool) | 58 | if (!client->pool) |
| 60 | goto bad; | 59 | goto bad; |
| 61 | 60 | ||
| 62 | client->bios = bioset_create(MIN_BIOS, 0); | 61 | client->bios = bioset_create(min_ios, 0); |
| 63 | if (!client->bios) | 62 | if (!client->bios) |
| 64 | goto bad; | 63 | goto bad; |
| 65 | 64 | ||
