mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
blk-wbt: make enable_state more accurate
Currently, if user disable wbt through sysfs, 'enable_state' will be 'WBT_STATE_ON_MANUAL', which will be confusing. Add a new state 'WBT_STATE_OFF_MANUAL' to cover that case. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20221019121518.3865235-4-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -435,8 +435,13 @@ void wbt_set_min_lat(struct request_queue *q, u64 val)
|
||||
struct rq_qos *rqos = wbt_rq_qos(q);
|
||||
if (!rqos)
|
||||
return;
|
||||
|
||||
RQWB(rqos)->min_lat_nsec = val;
|
||||
RQWB(rqos)->enable_state = WBT_STATE_ON_MANUAL;
|
||||
if (val)
|
||||
RQWB(rqos)->enable_state = WBT_STATE_ON_MANUAL;
|
||||
else
|
||||
RQWB(rqos)->enable_state = WBT_STATE_OFF_MANUAL;
|
||||
|
||||
wbt_update_limits(RQWB(rqos));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user