Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ff076d3 authored by Jens Axboe's avatar Jens Axboe Committed by Pranav Vashi
Browse files

cfq-iosched: fix the setting of IOPS mode on SSDs



A previous commit wanted to make CFQ default to IOPS mode on
non-rotational storage, however it did so when the queue was
initialized and the non-rotational flag is only set later on
in the probe.

Add an elevator hook that gets called off the add_disk() path,
at that point we know that feature probing has finished, and
we can reliably check for the various flags that drivers can
set.

Change-Id: I224601a1e10f5905cc26914002104c095db0def6
Fixes: 41c0126b ("block: Make CFQ default to IOPS mode on SSDs")
Tested-by: default avatarRomain Francoise <romain@orebokech.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarFrancisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: default avatarkdrag0n <dragon@khronodragon.com>
Signed-off-by: default avatarCyber Knight <cyberknight755@gmail.com>
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent 8220ad7d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4729,7 +4729,7 @@ static int cfq_init_queue(struct request_queue *q, struct elevator_type *e)
	cfqd->cfq_slice[1] = cfq_slice_sync;
	cfqd->cfq_target_latency = cfq_target_latency;
	cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
	cfqd->cfq_slice_idle = blk_queue_nonrot(q) ? 0 : cfq_slice_idle;
	cfqd->cfq_slice_idle = cfq_slice_idle;
	cfqd->cfq_group_idle = cfq_group_idle;
	cfqd->cfq_latency = 1;
	cfqd->hw_tag = -1;