diff options
author | Jens Axboe <axboe@fb.com> | 2016-11-28 17:25:50 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-28 18:27:03 +0100 |
commit | fa224eed2b5e0f2f9a57281e9dc733c843d590ad (patch) | |
tree | e7cdf9a2458ec2fd000c536add5ac206ee1dd9f9 /block/blk-wbt.c | |
parent | blk-wbt: allow reset of default latency through sysfs (diff) | |
download | linux-fa224eed2b5e0f2f9a57281e9dc733c843d590ad.tar.xz linux-fa224eed2b5e0f2f9a57281e9dc733c843d590ad.zip |
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.c | 10 |
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) { |