Skip to content

Commit

Permalink
bcache: configure the asynchronous registertion to be experimental
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Coly Li authored and axboe committed May 27, 2020
1 parent 9e23ccf commit 0c8d3fc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/md/bcache/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,12 @@ config BCACHE_CLOSURES_DEBUG
Keeps all active closures in a linked list and provides a debugfs
interface to list them, which makes it possible to see asynchronous
operations that get stuck.

config BCACHE_ASYNC_REGISTRAION
bool "Asynchronous device registration (EXPERIMENTAL)"
depends on BCACHE
help
Add a sysfs file /sys/fs/bcache/register_async. Writing registering
device path into this file will returns immediately and the real
registration work is handled in kernel work queue in asynchronous
way.
2 changes: 2 additions & 0 deletions drivers/md/bcache/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2765,7 +2765,9 @@ static int __init bcache_init(void)
static const struct attribute *files[] = {
&ksysfs_register.attr,
&ksysfs_register_quiet.attr,
#ifdef CONFIG_BCACHE_ASYNC_REGISTRAION
&ksysfs_register_async.attr,
#endif
&ksysfs_pendings_cleanup.attr,
NULL
};
Expand Down

0 comments on commit 0c8d3fc

Please sign in to comment.