diff options
author | Shenghui Wang <shhuiw@foxmail.com> | 2018-12-13 22:53:51 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-13 08:15:54 -0700 |
commit | f383ae300c4b6466824fd5c8cbd0a6c4ed2b53d3 (patch) | |
tree | 7e68c2e8cfd414d4c94f9493adb1335cfceeb925 /drivers/md/dm-cache-policy.c | |
parent | 79b791466e525c98f6aeee9acf5726e7b27f4231 (diff) |
bcache: cannot set writeback_running via sysfs if no writeback kthread created
"echo 1 > writeback_running" marks writeback_running even if no
writeback kthread created as "d_strtoul(writeback_running)" will simply
set dc-> writeback_running without checking the existence of
dc->writeback_thread.
Add check for setting writeback_running via sysfs: if no writeback
kthread available, reject setting to 1.
v2 -> v3:
* Make message on wrong assignment more clear.
* Print name of bcache device instead of name of backing device.
Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-cache-policy.c')
0 files changed, 0 insertions, 0 deletions