Commit aa304fde authored by Ed Cashin's avatar Ed Cashin Committed by Linus Torvalds

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: default avatarEd Cashin <ecashin@coraid.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4ba9aa7f
...@@ -16,11 +16,18 @@ ...@@ -16,11 +16,18 @@
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/moduleparam.h>
#include "aoe.h" #include "aoe.h"
static DEFINE_MUTEX(aoeblk_mutex); static DEFINE_MUTEX(aoeblk_mutex);
static struct kmem_cache *buf_pool_cache; static struct kmem_cache *buf_pool_cache;
/* GPFS needs a larger value than the default. */
static int aoe_maxsectors;
module_param(aoe_maxsectors, int, 0644);
MODULE_PARM_DESC(aoe_maxsectors,
"When nonzero, set the maximum number of sectors per I/O request");
static ssize_t aoedisk_show_state(struct device *dev, static ssize_t aoedisk_show_state(struct device *dev,
struct device_attribute *attr, char *page) struct device_attribute *attr, char *page)
{ {
...@@ -248,6 +255,8 @@ aoeblk_gdalloc(void *vp) ...@@ -248,6 +255,8 @@ aoeblk_gdalloc(void *vp)
d->blkq = gd->queue = q; d->blkq = gd->queue = q;
q->queuedata = d; q->queuedata = d;
d->gd = gd; d->gd = gd;
if (aoe_maxsectors)
blk_queue_max_hw_sectors(q, aoe_maxsectors);
gd->major = AOE_MAJOR; gd->major = AOE_MAJOR;
gd->first_minor = d->sysminor; gd->first_minor = d->sysminor;
gd->fops = &aoe_bdops; gd->fops = &aoe_bdops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment