Commit 1e56f30
block: Make WBT latency writes honor enable state
queue/wbt_lat_usec controls both the stored WBT latency target and the
effective WBT enable state.
The old no-op check skipped updates whenever the converted latency
matched the stored min_lat_nsec. That check ignored whether the current
WBT state already matched the state requested by the write. For a queue
disabled by default, attempting to enable WBT by writing the default
value through sysfs could return success while the enable state was left
unchanged.
Treat a write as a no-op only when both the stored latency and the
effective WBT enabled state already match the converted value.
Signed-off-by: Guzebing <guzebing1612@gmail.com>
Link: https://patch.msgid.link/20260621014030.1625306-1-guzebing1612@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 3dd63db commit 1e56f30
1 file changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
813 | 813 | | |
814 | 814 | | |
815 | 815 | | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
816 | 831 | | |
817 | 832 | | |
818 | 833 | | |
| |||
1005 | 1020 | | |
1006 | 1021 | | |
1007 | 1022 | | |
1008 | | - | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
1009 | 1026 | | |
| 1027 | + | |
| 1028 | + | |
1010 | 1029 | | |
1011 | 1030 | | |
1012 | 1031 | | |
| |||
0 commit comments