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 <axboe@fb.com>
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 92df2f7..7c0e618 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -665,15 +665,21 @@
rwb->wc = write_cache_on;
}
-void wbt_disable(struct rq_wb *rwb)
+ /*
+ * Disable wbt, if enabled by default. Only called from CFQ, if we have
+ * cgroups enabled
+ */
+void wbt_disable_default(struct request_queue *q)
{
+ struct rq_wb *rwb = q->rq_wb;
+
if (rwb) {
del_timer_sync(&rwb->window_timer);
rwb->win_nsec = rwb->min_lat_nsec = 0;
wbt_update_limits(rwb);
}
}
-EXPORT_SYMBOL_GPL(wbt_disable);
+EXPORT_SYMBOL_GPL(wbt_disable_default);
u64 wbt_default_latency_nsec(struct request_queue *q)
{