[lvm-devel] snapshot: refactor snapshot-merge deptree and device removal
Mike Snitzer
snitzer at redhat.com
Mon Feb 15 22:48:02 UTC 2010
On Mon, Feb 15 2010 at 5:43pm -0500,
Mike Snitzer <snitzer at redhat.com> wrote:
> Add a merging snapshot using the "error" target rather than avoid
> adding it entirely. This allows proper cleanup of the -cow device
> without having to rename the -cow to use the origin's name as a
> prefix.
>
> Moved the preloading of the origin LV, after a merge, from
> lv_remove_single() to vg_remove_single(). Having vg_remove_single()
> preload the origin free up the -cow device so that it can be removed
> via deactivate_lv(). This is reliable because the associated snapshot
> LV, that is to be removed when a snapshot-merge completes, is always
> added no to the deptree (and kernel -- via "error" target).
>
> Now when the snapshot LV is removed both the -cow and -real devices
> get removed using uuid rather than device name. This paves the way
> for us to switch over to info-by-uuid queries.
I tested this patch with and without Milan's info-by-uuid patches here:
http://mazyland.englab.brq.redhat.com/test-shared/
Mike
More information about the lvm-devel
mailing list