From: Ed Cashin Date: Tue, 18 Dec 2012 00:03:32 +0000 (-0800) Subject: aoe: support larger I/O requests via aoe_maxsectors module param X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa304fdefa568d63c862df7abe55d39811845c7c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 00dfc5008ad4..d5aa3b8c9f33 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c @@ -16,11 +16,18 @@ #include #include #include +#include #include "aoe.h" static DEFINE_MUTEX(aoeblk_mutex); 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, struct device_attribute *attr, char *page) { @@ -248,6 +255,8 @@ aoeblk_gdalloc(void *vp) d->blkq = gd->queue = q; q->queuedata = d; d->gd = gd; + if (aoe_maxsectors) + blk_queue_max_hw_sectors(q, aoe_maxsectors); gd->major = AOE_MAJOR; gd->first_minor = d->sysminor; gd->fops = &aoe_bdops;