diff mbox

[2/2] UBUNTU: SAUCE: hio: splitting bio in the entry of .make_request_fn

Message ID 1478289989-10139-3-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Nov. 4, 2016, 8:06 p.m. UTC
From: Ming Lei <tom.leiming@gmail.com>

BugLink: http://bugs.launchpad.net/bugs/1638700

From v4.3, the incoming bio can be very big[1], and it is
required to split it first in .make_request_fn(), so
we need to do that for hio.c too.

[1] c66a14d07c136cc3(block: simplify bio_add_page())

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
---
 ubuntu/hio/hio.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/ubuntu/hio/hio.c b/ubuntu/hio/hio.c
index 25554c0..25a3337 100644
--- a/ubuntu/hio/hio.c
+++ b/ubuntu/hio/hio.c
@@ -8314,6 +8314,10 @@  static int ssd_make_request(struct request_queue *q, struct bio *bio)
 
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0))
+	blk_queue_split(q, &bio, q->bio_split);
+#endif
+
 	if (0 == atomic_read(&dev->in_sendq)) {
 		ret = ssd_submit_bio(dev, bio, 0);
 	}