[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH] Fix removal of multiple devices from a mirror.

Is this problem still present after applying the previous patch:

The above patch was posted to fix a problem with specified PVs not being handled properly.

On Dec 17, 2009, at 7:51 AM, Petr Rockai wrote:


the code for removing mirror images, as it is, shifts the first failed
leg twice and fails to shift the second failed one at all, which
reorders the mirror image array in such a way that a wrong leg is
removed as a result.

The trivial patch below fixes that behaviour by adjusting the array
pointer to accommodate for the shift. Fixes RHBZ 543225.


Index: lib/metadata/mirror.c
RCS file: /cvs/lvm2/LVM2/lib/metadata/mirror.c,v
retrieving revision 1.99
diff -u -p -r1.99 mirror.c
--- lib/metadata/mirror.c	9 Dec 2009 19:53:39 -0000	1.99
+++ lib/metadata/mirror.c	17 Dec 2009 13:43:30 -0000
@@ -533,6 +533,7 @@ static int _remove_mirror_images(struct
			    _is_mirror_image_removable(sub_lv, removable_pvs)) {
				if (!shift_mirror_images(mirrored_seg, s))
+				s--; /* adjust counter after shifting */

lvm-devel mailing list
lvm-devel redhat com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]