diff options
| -rw-r--r-- | drivers/md/bcache/bcache.h | 2 | ||||
| -rw-r--r-- | drivers/md/bcache/btree.c | 22 | ||||
| -rw-r--r-- | drivers/md/bcache/super.c | 2 |
3 files changed, 2 insertions, 24 deletions
diff --git a/drivers/md/bcache/bcache.h b/drivers/md/bcache/bcache.h index 014236e411d8..15d26236caf9 100644 --- a/drivers/md/bcache/bcache.h +++ b/drivers/md/bcache/bcache.h | |||
| @@ -962,7 +962,5 @@ void bch_debug_exit(void); | |||
| 962 | int bch_debug_init(struct kobject *); | 962 | int bch_debug_init(struct kobject *); |
| 963 | void bch_request_exit(void); | 963 | void bch_request_exit(void); |
| 964 | int bch_request_init(void); | 964 | int bch_request_init(void); |
| 965 | void bch_btree_exit(void); | ||
| 966 | int bch_btree_init(void); | ||
| 967 | 965 | ||
| 968 | #endif /* _BCACHE_H */ | 966 | #endif /* _BCACHE_H */ |
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index 01b1b7e23cf2..beb32551da78 100644 --- a/drivers/md/bcache/btree.c +++ b/drivers/md/bcache/btree.c | |||
| @@ -93,8 +93,6 @@ | |||
| 93 | #define PTR_HASH(c, k) \ | 93 | #define PTR_HASH(c, k) \ |
| 94 | (((k)->ptr[0] >> c->bucket_bits) | PTR_GEN(k, 0)) | 94 | (((k)->ptr[0] >> c->bucket_bits) | PTR_GEN(k, 0)) |
| 95 | 95 | ||
| 96 | static struct workqueue_struct *btree_io_wq; | ||
| 97 | |||
| 98 | #define insert_lock(s, b) ((b)->level <= (s)->lock) | 96 | #define insert_lock(s, b) ((b)->level <= (s)->lock) |
| 99 | 97 | ||
| 100 | /* | 98 | /* |
| @@ -362,8 +360,7 @@ static void __btree_node_write_done(struct closure *cl) | |||
| 362 | btree_complete_write(b, w); | 360 | btree_complete_write(b, w); |
| 363 | 361 | ||
| 364 | if (btree_node_dirty(b)) | 362 | if (btree_node_dirty(b)) |
| 365 | queue_delayed_work(btree_io_wq, &b->work, | 363 | schedule_delayed_work(&b->work, 30 * HZ); |
| 366 | msecs_to_jiffies(30000)); | ||
| 367 | 364 | ||
| 368 | closure_return_with_destructor(cl, btree_node_write_unlock); | 365 | closure_return_with_destructor(cl, btree_node_write_unlock); |
| 369 | } | 366 | } |
| @@ -535,7 +532,7 @@ static void bch_btree_leaf_dirty(struct btree *b, atomic_t *journal_ref) | |||
| 535 | BUG_ON(!i->keys); | 532 | BUG_ON(!i->keys); |
| 536 | 533 | ||
| 537 | if (!btree_node_dirty(b)) | 534 | if (!btree_node_dirty(b)) |
| 538 | queue_delayed_work(btree_io_wq, &b->work, 30 * HZ); | 535 | schedule_delayed_work(&b->work, 30 * HZ); |
| 539 | 536 | ||
| 540 | set_btree_node_dirty(b); | 537 | set_btree_node_dirty(b); |
| 541 | 538 | ||
| @@ -2446,18 +2443,3 @@ void bch_keybuf_init(struct keybuf *buf) | |||
| 2446 | spin_lock_init(&buf->lock); | 2443 | spin_lock_init(&buf->lock); |
| 2447 | array_allocator_init(&buf->freelist); | 2444 | array_allocator_init(&buf->freelist); |
| 2448 | } | 2445 | } |
| 2449 | |||
| 2450 | void bch_btree_exit(void) | ||
| 2451 | { | ||
| 2452 | if (btree_io_wq) | ||
| 2453 | destroy_workqueue(btree_io_wq); | ||
| 2454 | } | ||
| 2455 | |||
| 2456 | int __init bch_btree_init(void) | ||
| 2457 | { | ||
| 2458 | btree_io_wq = create_singlethread_workqueue("bch_btree_io"); | ||
| 2459 | if (!btree_io_wq) | ||
| 2460 | return -ENOMEM; | ||
| 2461 | |||
| 2462 | return 0; | ||
| 2463 | } | ||
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index 9ded06434e11..307fe378ea43 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c | |||
| @@ -2072,7 +2072,6 @@ static void bcache_exit(void) | |||
| 2072 | { | 2072 | { |
| 2073 | bch_debug_exit(); | 2073 | bch_debug_exit(); |
| 2074 | bch_request_exit(); | 2074 | bch_request_exit(); |
| 2075 | bch_btree_exit(); | ||
| 2076 | if (bcache_kobj) | 2075 | if (bcache_kobj) |
| 2077 | kobject_put(bcache_kobj); | 2076 | kobject_put(bcache_kobj); |
| 2078 | if (bcache_wq) | 2077 | if (bcache_wq) |
| @@ -2102,7 +2101,6 @@ static int __init bcache_init(void) | |||
| 2102 | if (!(bcache_wq = create_workqueue("bcache")) || | 2101 | if (!(bcache_wq = create_workqueue("bcache")) || |
| 2103 | !(bcache_kobj = kobject_create_and_add("bcache", fs_kobj)) || | 2102 | !(bcache_kobj = kobject_create_and_add("bcache", fs_kobj)) || |
| 2104 | sysfs_create_files(bcache_kobj, files) || | 2103 | sysfs_create_files(bcache_kobj, files) || |
| 2105 | bch_btree_init() || | ||
| 2106 | bch_request_init() || | 2104 | bch_request_init() || |
| 2107 | bch_debug_init(bcache_kobj)) | 2105 | bch_debug_init(bcache_kobj)) |
| 2108 | goto err; | 2106 | goto err; |
