blk-wbt: make enable_state more accurate
authorYu Kuai <yukuai3@huawei.com>
Wed, 19 Oct 2022 12:15:15 +0000 (20:15 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Oct 2022 00:59:17 +0000 (18:59 -0600)
commita9a236d238a5e8ab2e74ca62c2c7ba5dd435af77
tree00317949d6b138449279ed53f8ca090375b92d8d
parentb11d31ae01e6b0762b28e645ad6718a12faa8d14
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>
block/blk-wbt.c
block/blk-wbt.h