aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/spa_config.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 11:49:16 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 13:41:58 -0700
commitc28b227942b421ebdc03c9df9a012642fb517223 (patch)
treeec584e21d6fbc819353792d54a7dffb454029111 /module/zfs/spa_config.c
parent00b46022c676e402e3f33ce93ee2983bbad2c46f (diff)
Add linux kernel module support
Setup linux kernel module support, this includes: - zfs context for kernel/user - kernel module build system integration - kernel module macros - kernel module symbol export - kernel module options Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/spa_config.c')
-rw-r--r--module/zfs/spa_config.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/module/zfs/spa_config.c b/module/zfs/spa_config.c
index b7ef12a8f..79664cbe1 100644
--- a/module/zfs/spa_config.c
+++ b/module/zfs/spa_config.c
@@ -61,7 +61,7 @@ static uint64_t spa_config_generation = 1;
* This can be overridden in userland to preserve an alternate namespace for
* userland pools when doing testing.
*/
-const char *spa_config_path = ZPOOL_CACHE;
+char *spa_config_path = ZPOOL_CACHE;
/*
* Called when the module is first loaded, this routine loads the configuration
@@ -485,3 +485,15 @@ spa_config_update(spa_t *spa, int what)
if (what == SPA_CONFIG_UPDATE_POOL)
spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS);
}
+
+#if defined(_KERNEL) && defined(HAVE_SPL)
+EXPORT_SYMBOL(spa_config_sync);
+EXPORT_SYMBOL(spa_config_load);
+EXPORT_SYMBOL(spa_all_configs);
+EXPORT_SYMBOL(spa_config_set);
+EXPORT_SYMBOL(spa_config_generate);
+EXPORT_SYMBOL(spa_config_update);
+
+module_param(spa_config_path, charp, 0444);
+MODULE_PARM_DESC(spa_config_path, "SPA config file (/etc/zfs/zpool.cache)");
+#endif