diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-05-13 16:46:08 +1000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-08-06 14:08:27 +1000 |
commit | 754c0737db6b7337f1d3b40e6e52d9c3abec954f (patch) | |
tree | c84598e7790ebd8638b63128edbe720f77ada278 /discover/devmapper.h | |
parent | d2f71341c8077c649c00f75c1f6c3f590c1b2576 (diff) | |
download | talos-petitboot-754c0737db6b7337f1d3b40e6e52d9c3abec954f.tar.gz talos-petitboot-754c0737db6b7337f1d3b40e6e52d9c3abec954f.zip |
discover: Support creation of device-mapper devices
Add discover/dm-snapshot that allows the creation of device-mapper
snapshots that support merging changes back to disk.
Device-mapper snapshots are a CoW device backed by a ramdisk, mirroring
the contents of a source device. No changes are made to the original
disk unless an explicit merge action is performed. This guarantees
read-only mounting of host disks even when writes could implicitly
occur, eg. when performing recovering a journaled filesystem.
In the event that writing back to the disk is desired, such as when
updating grubenv, the changes made to the snapshot can be merged back to
the source disk.
This patch adds support but does not change functionality.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'discover/devmapper.h')
-rw-r--r-- | discover/devmapper.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/discover/devmapper.h b/discover/devmapper.h new file mode 100644 index 0000000..ae8196c --- /dev/null +++ b/discover/devmapper.h @@ -0,0 +1,11 @@ +#ifndef _DEVMAPPER_H +#define _DEVMAPPER_H + +#include "device-handler.h" + +int devmapper_init_snapshot(struct device_handler *handler, + struct discover_device *device); +int devmapper_destroy_snapshot(struct discover_device *device); +int devmapper_merge_snapshot(struct discover_device *device); + +#endif /* _DEVMAPPER_H */ |