History

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.

Coly Li committed 6 years ago

Commit 0c8d3fc1 parent 9e23ccf2 files · +11 −0Browse files

Unified · Split

2 files
  1. drivers/md/bcache/Kconfig +9 −0
  2. drivers/md/bcache/super.c +2 −0
drivers/md/bcache/Kconfig+9−0
@@ -26,3 +26,12 @@ config BCACHE_CLOSURES_DEBUG · 25 unmodified lines
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+2−0
@@ -2765,7 +2765,9 @@ static int __init bcache_init(void) · 2764 unmodified lines
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 };