diff options
author | Ed Cashin <ecashin@coraid.com> | 2012-12-17 19:03:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:23 -0500 |
commit | aa304fdefa568d63c862df7abe55d39811845c7c (patch) | |
tree | d96b9161f58e913baae3031b6512a534b036d98b /drivers/block/aoe | |
parent | 4ba9aa7f9819bafb304f09dee90bb1fa40627358 (diff) |
aoe: support larger I/O requests via aoe_maxsectors module param
The GPFS filesystem is an example of an aoe user that requires the aoe
driver to support I/O request sizes larger than the default. Most users
will not need large I/O request sizes, because they would need to be split
up into multiple AoE commands anyway.
Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/aoe')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 00dfc5008ad..d5aa3b8c9f3 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -16,11 +16,18 @@ | |||
16 | #include <linux/netdevice.h> | 16 | #include <linux/netdevice.h> |
17 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
18 | #include <linux/export.h> | 18 | #include <linux/export.h> |
19 | #include <linux/moduleparam.h> | ||
19 | #include "aoe.h" | 20 | #include "aoe.h" |
20 | 21 | ||
21 | static DEFINE_MUTEX(aoeblk_mutex); | 22 | static DEFINE_MUTEX(aoeblk_mutex); |
22 | static struct kmem_cache *buf_pool_cache; | 23 | static struct kmem_cache *buf_pool_cache; |
23 | 24 | ||
25 | /* GPFS needs a larger value than the default. */ | ||
26 | static int aoe_maxsectors; | ||
27 | module_param(aoe_maxsectors, int, 0644); | ||
28 | MODULE_PARM_DESC(aoe_maxsectors, | ||
29 | "When nonzero, set the maximum number of sectors per I/O request"); | ||
30 | |||
24 | static ssize_t aoedisk_show_state(struct device *dev, | 31 | static ssize_t aoedisk_show_state(struct device *dev, |
25 | struct device_attribute *attr, char *page) | 32 | struct device_attribute *attr, char *page) |
26 | { | 33 | { |
@@ -248,6 +255,8 @@ aoeblk_gdalloc(void *vp) | |||
248 | d->blkq = gd->queue = q; | 255 | d->blkq = gd->queue = q; |
249 | q->queuedata = d; | 256 | q->queuedata = d; |
250 | d->gd = gd; | 257 | d->gd = gd; |
258 | if (aoe_maxsectors) | ||
259 | blk_queue_max_hw_sectors(q, aoe_maxsectors); | ||
251 | gd->major = AOE_MAJOR; | 260 | gd->major = AOE_MAJOR; |
252 | gd->first_minor = d->sysminor; | 261 | gd->first_minor = d->sysminor; |
253 | gd->fops = &aoe_bdops; | 262 | gd->fops = &aoe_bdops; |