]> sourceware.org Git - lvm2.git/commit
Fix reversal of LV list before performing a split mirror.
authorJonathan Earl Brassow <jbrassow@redhat.com>
Tue, 13 Jul 2010 22:04:36 +0000 (22:04 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Tue, 13 Jul 2010 22:04:36 +0000 (22:04 +0000)
commit48c245884e25070ad8f7f4b86d2cae0bb031f1a0
treedb9b534f54546fadc0e33afa53d5d3085a16847d
parentceb0db233a247001af0693fd27163076d7e25c6c
Fix reversal of LV list before performing a split mirror.

When splitting off mirror images from a mirror, we always take
LVs from the end of a list.  For example, if the mirror sub-devices
are lv_mimage_[012], we should select lv_mimage_2 if splitting off
one image.  However, lv_mimage_0 was being selected instead.

The problem came from calling '_move_removable_mimages_to_end'
when it was unnecessary to do so.  When the user /does/ specify
specific devices to be removed, this function properly moved the
appropriate LVs to the end of the list for extraction.  However,
if the user /doesn't/ give any specific PVs, the function should
do nothing.  '_move_removable_mimages_to_end' was keying off of
whether 'removable_pvs' was NULL or not and this value was
improperly being populated with the set of all available PVs.
This was causing '_move_removable_mimages_to_end' to completely
reverse the list, which in turn caused us to extract the
hithertofore front-of-the-list LVs.
tools/lvconvert.c
This page took 0.036583 seconds and 5 git commands to generate.