]> sourceware.org Git - lvm2.git/commit - libdm/libdm-deptree.c
Add support for "snapshot-merge" target.
authorMike Snitzer <snitzer@redhat.com>
Wed, 13 Jan 2010 01:39:44 +0000 (01:39 +0000)
committerMike Snitzer <snitzer@redhat.com>
Wed, 13 Jan 2010 01:39:44 +0000 (01:39 +0000)
commitaa6f4e51a74948c5fea7625b02dc9441e437882b
treeb6f81ba5698f8f92fc21fd2d821de09ad15eedc2
parent68e8f5a4a2f17654836580583169736e1d3f0882
Add support for "snapshot-merge" target.

Introduces new libdevmapper function dm_tree_node_add_snapshot_merge_target

Verifies that the kernel (dm-snapshot) provides the 'snapshot-merge'
target.

Activate origin LV as snapshot-merge target.  Using snapshot-origin
target would be pointless because the origin contains volatile data
while a merge is in progress.

Because snapshot-merge target is activated in place of the
snapshot-origin target it must be resumed after all other snapshots
(just like snapshot-origin does) --- otherwise small window for data
corruption would exist.

Ideally the merging snapshot would not be activated at all but if it is
to be activated (because snapshot was already active) it _must_ be done
after the snapshot-merge.  This insures that DM's snapshot-merge target
will perform exception handover in the proper order (new->resume before
old->resume).  DM's snapshot-merge does support handover if the reverse
sequence is used (old->resume before new->resume) but DM will fail to
resume the old snapshot; leaving it suspended.

To insure the proper activation sequence dm_tree_activate_children() was
updated to accommodate an additional 'activation_priority' level.  All
regular snapshots are 0, snapshot-merge is 1, and merging snapshot is 2.
lib/snapshot/snapshot.c
libdm/.exported_symbols
libdm/libdevmapper.h
libdm/libdm-deptree.c
This page took 0.031983 seconds and 5 git commands to generate.