diff options
author | Alasdair Kergon <agk@redhat.com> | 2008-09-18 19:56:50 +0000 |
---|---|---|
committer | Alasdair Kergon <agk@redhat.com> | 2008-09-18 19:56:50 +0000 |
commit | 324e23b72d35c9c861739d003f712ddace36714f (patch) | |
tree | 7f31cd4874340f86c819248978ef3aa6a9ce3dc6 /tools/vgreduce.c | |
parent | 4bb7a2f523acbf649fee31678c2e07474d473747 (diff) | |
download | lvm2-324e23b72d35c9c861739d003f712ddace36714f.tar.gz lvm2-324e23b72d35c9c861739d003f712ddace36714f.tar.xz lvm2-324e23b72d35c9c861739d003f712ddace36714f.zip |
Avoid shuffling remaining mirror images when removing one, retaining primary.
Diffstat (limited to 'tools/vgreduce.c')
-rw-r--r-- | tools/vgreduce.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/vgreduce.c b/tools/vgreduce.c index 5e613824..f2a5e218 100644 --- a/tools/vgreduce.c +++ b/tools/vgreduce.c @@ -250,9 +250,8 @@ static int _make_vg_consistent(struct cmd_context *cmd, struct volume_group *vg) lvl2->lv != seg_lv(mirrored_seg, s)) continue; list_del(&lvl2->list); - area = mirrored_seg->areas[mimages - 1]; - mirrored_seg->areas[mimages - 1] = mirrored_seg->areas[s]; - mirrored_seg->areas[s] = area; + if (!shift_mirror_images(mirrored_seg, s)) + return_0; mimages--; /* FIXME Assumes uniqueness */ } } |