discover: Support creation of device-mapper devices
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Wed, 13 May 2015 06:46:08 +0000 (16:46 +1000)
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Thu, 6 Aug 2015 04:08:27 +0000 (14:08 +1000)
commit754c0737db6b7337f1d3b40e6e52d9c3abec954f
treec84598e7790ebd8638b63128edbe720f77ada278
parentd2f71341c8077c649c00f75c1f6c3f590c1b2576
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>
discover/Makefile.am
discover/devmapper.c [new file with mode: 0644]
discover/devmapper.h [new file with mode: 0644]