summaryrefslogtreecommitdiff
path: root/block/blk-wbt.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-11-28 09:25:50 -0700
committerJens Axboe <axboe@fb.com>2016-11-28 10:27:03 -0700
commitfa224eed2b5e0f2f9a57281e9dc733c843d590ad (patch)
treee7cdf9a2458ec2fd000c536add5ac206ee1dd9f9 /block/blk-wbt.c
parent80e091d10e8bf7b801d634ea8870b9e907314424 (diff)
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>
Diffstat (limited to 'block/blk-wbt.c')
-rw-r--r--block/blk-wbt.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 92df2f7c5af1..7c0e618d6e7d 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -665,15 +665,21 @@ void wbt_set_write_cache(struct rq_wb *rwb, bool write_cache_on)
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)
{