1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

snapshot: code move

Move some code lines in front, they will be shared with thin snapshot
merge later.
This commit is contained in:
Zdenek Kabelac 2013-11-22 18:19:13 +01:00
parent 30c127eaf8
commit 1ff53bb7b6

View File

@ -154,6 +154,10 @@ void init_snapshot_seg(struct lv_segment *seg, struct logical_volume *origin,
void init_snapshot_merge(struct lv_segment *snap_seg,
struct logical_volume *origin)
{
snap_seg->status |= MERGING;
origin->snapshot = snap_seg;
origin->status |= MERGING;
/*
* Even though lv_is_visible(snap_seg->lv) returns 0,
* the snap_seg->lv (name: snapshotX) is _not_ hidden;
@ -165,9 +169,6 @@ void init_snapshot_merge(struct lv_segment *snap_seg,
* merge metadata (snap_seg->lv is now "internal")
*/
snap_seg->lv->status &= ~VISIBLE_LV;
snap_seg->status |= MERGING;
origin->snapshot = snap_seg;
origin->status |= MERGING;
}
void clear_snapshot_merge(struct logical_volume *origin)