Skip to content

Commit 0c8d3fc

Browse files
Coly Liaxboe
authored andcommitted
bcache: configure the asynchronous registertion to be experimental
In order to avoid the experimental async registration interface to be treated as new kernel ABI for common users, this patch makes it as an experimental kernel configure BCACHE_ASYNC_REGISTRAION. This interface is for extreme large cached data situation, to make sure the bcache device can always created without the udev timeout issue. For normal users the async or sync registration does not make difference. In future when we decide to use the asynchronous registration as default behavior, this experimental interface may be removed. Signed-off-by: Coly Li <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 9e23ccf commit 0c8d3fc

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

drivers/md/bcache/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ config BCACHE_CLOSURES_DEBUG
2626
Keeps all active closures in a linked list and provides a debugfs
2727
interface to list them, which makes it possible to see asynchronous
2828
operations that get stuck.
29+
30+
config BCACHE_ASYNC_REGISTRAION
31+
bool "Asynchronous device registration (EXPERIMENTAL)"
32+
depends on BCACHE
33+
help
34+
Add a sysfs file /sys/fs/bcache/register_async. Writing registering
35+
device path into this file will returns immediately and the real
36+
registration work is handled in kernel work queue in asynchronous
37+
way.

drivers/md/bcache/super.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2765,7 +2765,9 @@ static int __init bcache_init(void)
27652765
static const struct attribute *files[] = {
27662766
&ksysfs_register.attr,
27672767
&ksysfs_register_quiet.attr,
2768+
#ifdef CONFIG_BCACHE_ASYNC_REGISTRAION
27682769
&ksysfs_register_async.attr,
2770+
#endif
27692771
&ksysfs_pendings_cleanup.attr,
27702772
NULL
27712773
};

0 commit comments

Comments
 (0)