]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: use delayed kworker fo asynchronous devices registration
authorColy Li <colyli@suse.de>
Sun, 14 Jun 2020 16:53:32 +0000 (00:53 +0800)
committerJens Axboe <axboe@kernel.dk>
Sun, 14 Jun 2020 22:47:56 +0000 (16:47 -0600)
commitc8a90d2cec351d3761a8f96c1782242ee0cdde4f
tree64b9b74b22788eaefcb03660514aa68408598741
parentb07bbd0b75ac1b1e8b6925796240d560acd6bb06
bcache: use delayed kworker fo asynchronous devices registration

This patch changes the asynchronous registration kworker to a delayed
kworker. There is probability queue_work() queues the async registration
kworker to the same CPU (even though very little), then the process
which writing sysfs interface to reigster bcache device may won't return
immeidately. queue_delayed_work() in this patch will delay 10 jiffies
before insert the kworker to run queue, which makes sure the registering
process may always returns to user space in time.

Fixes: 91c680124cb3e ("bcache: asynchronous devices registration")
Signed-off-by: Coly Li <colyli@suse.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c