|
@@ -47,6 +47,7 @@ static int bcache_major;
|
|
static DEFINE_IDA(bcache_device_idx);
|
|
static DEFINE_IDA(bcache_device_idx);
|
|
static wait_queue_head_t unregister_wait;
|
|
static wait_queue_head_t unregister_wait;
|
|
struct workqueue_struct *bcache_wq;
|
|
struct workqueue_struct *bcache_wq;
|
|
|
|
+struct workqueue_struct *bch_journal_wq;
|
|
|
|
|
|
#define BTREE_MAX_PAGES (256 * 1024 / PAGE_SIZE)
|
|
#define BTREE_MAX_PAGES (256 * 1024 / PAGE_SIZE)
|
|
/* limitation of partitions number on single bcache device */
|
|
/* limitation of partitions number on single bcache device */
|
|
@@ -2341,6 +2342,9 @@ static void bcache_exit(void)
|
|
kobject_put(bcache_kobj);
|
|
kobject_put(bcache_kobj);
|
|
if (bcache_wq)
|
|
if (bcache_wq)
|
|
destroy_workqueue(bcache_wq);
|
|
destroy_workqueue(bcache_wq);
|
|
|
|
+ if (bch_journal_wq)
|
|
|
|
+ destroy_workqueue(bch_journal_wq);
|
|
|
|
+
|
|
if (bcache_major)
|
|
if (bcache_major)
|
|
unregister_blkdev(bcache_major, "bcache");
|
|
unregister_blkdev(bcache_major, "bcache");
|
|
unregister_reboot_notifier(&reboot);
|
|
unregister_reboot_notifier(&reboot);
|
|
@@ -2370,6 +2374,10 @@ static int __init bcache_init(void)
|
|
if (!bcache_wq)
|
|
if (!bcache_wq)
|
|
goto err;
|
|
goto err;
|
|
|
|
|
|
|
|
+ bch_journal_wq = alloc_workqueue("bch_journal", WQ_MEM_RECLAIM, 0);
|
|
|
|
+ if (!bch_journal_wq)
|
|
|
|
+ goto err;
|
|
|
|
+
|
|
bcache_kobj = kobject_create_and_add("bcache", fs_kobj);
|
|
bcache_kobj = kobject_create_and_add("bcache", fs_kobj);
|
|
if (!bcache_kobj)
|
|
if (!bcache_kobj)
|
|
goto err;
|
|
goto err;
|