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

Kamal Mostafa kamal at canonical.com
Fri Nov 4 20:06:29 UTC 2016


From: Ming Lei <tom.leiming at 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 at canonical.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
Acked-by: Tim Gardner <tim.gardner at canonical.com>
Acked-by: Seth Forshee <seth.forshee at canonical.com>
---
 ubuntu/hio/hio.c | 4 ++++
 1 file changed, 4 insertions(+)

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);
 	}
-- 
2.7.4





More information about the kernel-team mailing list