diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-08-17 14:33:25 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-08-18 15:31:00 +1000 |
commit | 5b308c5680f349dd080f516f8c371efd67d496d5 (patch) | |
tree | aa8a2af8e2c315b66e482f9183fa9ec14c439b89 /discover/devmapper.c | |
parent | 61e30136d88c1e2cef353e09789dbb969be64f55 (diff) | |
download | talos-petitboot-5b308c5680f349dd080f516f8c371efd67d496d5.tar.gz talos-petitboot-5b308c5680f349dd080f516f8c371efd67d496d5.zip |
discover: Add disable param for dm-snapshots
Add a debug-style nvram parameter to disallow the use of device-mapper
snapshots.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'discover/devmapper.c')
-rw-r--r-- | discover/devmapper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/discover/devmapper.c b/discover/devmapper.c index 1fd1215..e2ef0b5 100644 --- a/discover/devmapper.c +++ b/discover/devmapper.c @@ -6,6 +6,7 @@ #include "libdevmapper.h" #include "devmapper.h" +#include "platform.h" #define MERGE_INTERVAL_US 200000 @@ -320,6 +321,9 @@ int devmapper_init_snapshot(struct device_handler *handler, { struct ramdisk_device *ramdisk; + if (config_get()->disable_snapshots) + return 0; + ramdisk = device_handler_get_ramdisk(handler); if (!ramdisk) { pb_log("No ramdisk available for snapshot %s\n", |