diff options
author | Alasdair Kergon <agk@redhat.com> | 2008-01-16 19:00:59 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2008-01-16 19:00:59 +0000 |
commit | 72baf0c3459c4c0749ae09cc0676bffba9626889 (patch) | |
tree | 6fb70f51abacdd5c407b8b049fdc5914dbba49cb /tools/vgreduce.c | |
parent | fb3226a3ed273e468b17786b33709b287e5f4ea7 (diff) | |
download | lvm2-72baf0c3459c4c0749ae09cc0676bffba9626889.tar.gz lvm2-72baf0c3459c4c0749ae09cc0676bffba9626889.tar.xz lvm2-72baf0c3459c4c0749ae09cc0676bffba9626889.zip |
Maintain lists of stacked LV segments using each LV.
Diffstat (limited to 'tools/vgreduce.c')
-rw-r--r-- | tools/vgreduce.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 77162012..62f12acd 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -50,7 +50,7 @@ static int _remove_pv(struct volume_group *vg, struct pv_list *pvl) static int _remove_lv(struct cmd_context *cmd, struct logical_volume *lv, int *list_unsafe, struct list *lvs_changed) { - struct lv_segment *snap_seg, *mirror_seg; + struct lv_segment *snap_seg; struct list *snh, *snht; struct logical_volume *cow; struct lv_list *lvl; @@ -117,9 +117,8 @@ static int _remove_lv(struct cmd_context *cmd, struct logical_volume *lv, * Clean-up is currently done by caller (_make_vg_consistent()). */ if ((lv_info(cmd, lv, &info, 0, 0) && info.exists) - || first_seg(lv)->mirror_seg) { + || find_mirror_seg(first_seg(lv))) { extents = lv->le_count; - mirror_seg = first_seg(lv)->mirror_seg; if (!lv_empty(lv)) { stack; return 0; @@ -130,10 +129,6 @@ static int _remove_lv(struct cmd_context *cmd, struct logical_volume *lv, stack; return 0; } - if (mirror_seg) { - first_seg(lv)->status |= MIRROR_IMAGE; - first_seg(lv)->mirror_seg = mirror_seg; - } if (!(lvl = dm_pool_alloc(cmd->mem, sizeof(*lvl)))) { log_error("lv_list alloc failed"); |