diff options
author | Kent Overstreet <kmo@daterainc.com> | 2013-07-24 17:50:06 -0700 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-11-10 21:56:05 -0800 |
commit | 5e6926daac267dd99552ae613f041a9e88bbf258 (patch) | |
tree | 0d9ebb689cccc61bc3bfca19c48ac83c5591df28 /drivers/md/bcache/super.c | |
parent | 72a44517f3ca3725dc86081d105457df46448679 (diff) | |
download | op-kernel-dev-5e6926daac267dd99552ae613f041a9e88bbf258.zip op-kernel-dev-5e6926daac267dd99552ae613f041a9e88bbf258.tar.gz |
bcache: Convert writeback to a kthread
This simplifies the writeback flow control quite a bit - previously, it
was conceptually two coroutines, refill_dirty() and read_dirty(). This
makes the code quite a bit more straightforward.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/super.c')
-rw-r--r-- | drivers/md/bcache/super.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index f89e229..b79dd5a 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1029,6 +1029,7 @@ static void cached_dev_free(struct closure *cl) struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); cancel_delayed_work_sync(&dc->writeback_rate_update); + kthread_stop(dc->writeback_thread); mutex_lock(&bch_register_lock); @@ -2006,7 +2007,6 @@ static struct notifier_block reboot = { static void bcache_exit(void) { bch_debug_exit(); - bch_writeback_exit(); bch_request_exit(); bch_btree_exit(); if (bcache_kobj) @@ -2039,7 +2039,6 @@ static int __init bcache_init(void) sysfs_create_files(bcache_kobj, files) || bch_btree_init() || bch_request_init() || - bch_writeback_init() || bch_debug_init(bcache_kobj)) goto err; |