Add spa_config_path module option for alternate cache file.
This commit is contained in:
parent
833277bc0e
commit
5bc2e9e592
|
@ -181,7 +181,7 @@ struct spa {
|
||||||
refcount_t spa_refcount; /* number of opens */
|
refcount_t spa_refcount; /* number of opens */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const char *spa_config_path;
|
extern char *spa_config_path;
|
||||||
|
|
||||||
#define BOOTFS_COMPRESS_VALID(compress) \
|
#define BOOTFS_COMPRESS_VALID(compress) \
|
||||||
((compress) == ZIO_COMPRESS_LZJB || \
|
((compress) == ZIO_COMPRESS_LZJB || \
|
||||||
|
|
|
@ -62,7 +62,7 @@ static uint64_t spa_config_generation = 1;
|
||||||
* This can be overridden in userland to preserve an alternate namespace for
|
* This can be overridden in userland to preserve an alternate namespace for
|
||||||
* userland pools when doing testing.
|
* 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
|
* Called when the module is first loaded, this routine loads the configuration
|
||||||
|
@ -450,4 +450,7 @@ EXPORT_SYMBOL(spa_all_configs);
|
||||||
EXPORT_SYMBOL(spa_config_set);
|
EXPORT_SYMBOL(spa_config_set);
|
||||||
EXPORT_SYMBOL(spa_config_generate);
|
EXPORT_SYMBOL(spa_config_generate);
|
||||||
EXPORT_SYMBOL(spa_config_update);
|
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
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue