bcache: improve bcache_reboot()
authorColy Li <colyli@suse.de>
Wed, 24 Apr 2019 16:48:40 +0000 (00:48 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Apr 2019 16:56:28 +0000 (10:56 -0600)
commiteb8cbb6df38f6e5124a3d5f1f8a3dbf519537c60
tree600f0789137da1c8fdfb4901d742e7f411a762db
parent63d63b51d70fb5155754dcf0baa2c1700bcafcb0
bcache: improve bcache_reboot()

This patch tries to release mutex bch_register_lock early, to give
chance to stop cache set and bcache device early.

This patch also expends time out of stopping all bcache device from
2 seconds to 10 seconds, because stopping writeback rate update worker
may delay for 5 seconds, 2 seconds is not enough.

After this patch applied, stopping bcache devices during system reboot
or shutdown is very hard to be observed any more.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c