]> sourceware.org Git - lvm2.git/commit
Patch to fix bug 586021 and mantain historical behavior of
authorJonathan Earl Brassow <jbrassow@redhat.com>
Tue, 27 Apr 2010 14:57:49 +0000 (14:57 +0000)
committerJonathan Earl Brassow <jbrassow@redhat.com>
Tue, 27 Apr 2010 14:57:49 +0000 (14:57 +0000)
commitd7c9d723908cc39e993e2c45839eea6bcece9cb5
tree115514a0da121be806e6b702559cbd1591496517
parentb9c4fc24982686031fe5cb89505621514888c174
Patch to fix bug 586021 and mantain historical behavior of
being able to remove more images from a mirror than the
number of PVs directly specified for removal.

The effort to fix bug 581611 corrected a bug that was unnoticed
at the time.  The loop in _remove_mirror_images that looks over
the specified PVs was allowing devices that were previously
counted and moved to the end of the list to be double-counted.
This resulted in the number of devices needed for removal always
being satisfied - even if the user did not specify enough PVs
for removal to satisfy the request.  When 581611 was fixed, this
double-counting no longer took place and the result was to remove
only the minimum of the number of PVs specified or the number
that was asked to be removed.

By simply always setting 'new_area_count' (as used to be done
only in the else statement), we return to the previous behavior.
Indeed, this is exactly what the double-counting was allowing
to happen before the fix of 581611.
WHATS_NEW
lib/metadata/mirror.c
This page took 0.102925 seconds and 5 git commands to generate.