[PATCH v3 2/7] block: introduce API to register stream information with block layer
From: Kanchan Joshi
Date: Fri Mar 29 2019 - 03:58:04 EST
This associates stream limit (count of streams exposed by driver) with
request queue.
Signed-off-by: Kanchan Joshi <joshi.k@xxxxxxxxxxx>
---
block/blk-settings.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index 3e7038e..bb0da61 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -231,6 +231,18 @@ void blk_queue_max_discard_sectors(struct request_queue *q,
EXPORT_SYMBOL(blk_queue_max_discard_sectors);
/**
+ * blk_queue_stream_limits - set stream parameters
+ * @q: the request queue for the device
+ * @nr_streams: number of streams supported by device
+ **/
+void blk_queue_stream_limits(struct request_queue *q,
+ unsigned short nr_streams)
+{
+ q->limits.nr_streams = nr_streams;
+}
+EXPORT_SYMBOL(blk_queue_stream_limits);
+
+/**
* blk_queue_max_write_same_sectors - set max sectors for a single write same
* @q: the request queue for the device
* @max_write_same_sectors: maximum number of sectors to write per command
--
2.7.4