From fa224eed2b5e0f2f9a57281e9dc733c843d590ad Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 28 Nov 2016 09:25:50 -0700 Subject: blk-wbt: cleanup disable-by-default for CFQ Make it clear that we are disabling wbt for the specified queued, if it was enabled by default. This is in preparation for allowing users to re-enable wbt, and not have it disabled automatically again. Signed-off-by: Jens Axboe --- block/cfq-iosched.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'block/cfq-iosched.c') diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 9894dc985e093..c73a6fcaeb9d5 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -3780,13 +3780,10 @@ static void check_blkcg_changed(struct cfq_io_cq *cic, struct bio *bio) /* * If we have a non-root cgroup, we can depend on that to * do proper throttling of writes. Turn off wbt for that - * case. + * case, if it was enabled by default. */ - if (nonroot_cg) { - struct request_queue *q = cfqd->queue; - - wbt_disable(q->rq_wb); - } + if (nonroot_cg) + wbt_disable_default(cfqd->queue); /* * Drop reference to queues. New queues will be assigned in new -- cgit v1.2.3