summaryrefslogtreecommitdiffstats
path: root/block/blk-settings.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-09-30 07:47:33 +1000
committerJames Morris <jmorris@namei.org>2009-09-30 07:47:33 +1000
commit1669b049db50fc7f1d4e694fb115a0f408c63fce (patch)
tree9b3b90b5cbff9b8f30ecf0b2a44896ce8bef0c20 /block/blk-settings.c
parent7f366784f5c2b8fc0658b5b374f4c63ee42c789f (diff)
parent17d857be649a21ca90008c6dc425d849fa83db5c (diff)
downloadop-kernel-dev-1669b049db50fc7f1d4e694fb115a0f408c63fce.zip
op-kernel-dev-1669b049db50fc7f1d4e694fb115a0f408c63fce.tar.gz
Merge branch 'master' into next
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r--block/blk-settings.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 476d870..83413ff 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -428,6 +428,25 @@ void blk_queue_io_min(struct request_queue *q, unsigned int min)
EXPORT_SYMBOL(blk_queue_io_min);
/**
+ * blk_limits_io_opt - set optimal request size for a device
+ * @limits: the queue limits
+ * @opt: smallest I/O size in bytes
+ *
+ * Description:
+ * Storage devices may report an optimal I/O size, which is the
+ * device's preferred unit for sustained I/O. This is rarely reported
+ * for disk drives. For RAID arrays it is usually the stripe width or
+ * the internal track size. A properly aligned multiple of
+ * optimal_io_size is the preferred request size for workloads where
+ * sustained throughput is desired.
+ */
+void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt)
+{
+ limits->io_opt = opt;
+}
+EXPORT_SYMBOL(blk_limits_io_opt);
+
+/**
* blk_queue_io_opt - set optimal request size for the queue
* @q: the request queue for the device
* @opt: optimal request size in bytes
@@ -442,7 +461,7 @@ EXPORT_SYMBOL(blk_queue_io_min);
*/
void blk_queue_io_opt(struct request_queue *q, unsigned int opt)
{
- q->limits.io_opt = opt;
+ blk_limits_io_opt(&q->limits, opt);
}
EXPORT_SYMBOL(blk_queue_io_opt);
OpenPOWER on IntegriCloud