Skip to contentSkip to conversation

fix bugs in temporary mirror layer handling

PATCH New Zdenek Kabelac 1 participant 1 message Mar 22, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 fix bugs in temporary mirror layer handling

Dne 20.3.2011 00:33, Petr Rockai napsal(a):

Just Some minor cosmetics

Quoted 4 lines

while working on vgreduce --removemissing --force, I have uncovered about half a dozen bugs in handling mirror image removal with temporary layers present in the mirror stack.

Quoted 9 lines

The patch did not break any tests from the test suite for me. It is a prerequisite for vgreduce --removemissing --force, but it also fixes the above bugs when triggered in plain lvconvert and in lvconvert --repair.

temp-mirror-layer-fixes.diff

array */

Review

Quoted 4 lines
(quoted diff) +1 -1
 	for (s = mirrored_seg->area_count - 1;
-	     s >= 0 && old_area_count - new_area_count < num_removed;
+	     s >= 0 && old_area_count - new_area_count < orig_removed;
 	     s--) {

braces ?

Review static int _remove_mirror_images(struct · line 831

Quoted 5 lines
(quoted diff) +1 -0
@@ -825,9 +828,13 @@ static int _remove_mirror_images(struct 
 			if (!shift_mirror_images(mirrored_seg, s))
 				return_0;
 			new_area_count--;
+			num_removed ++;

++num_removed

Review static int _remove_mirror_images(struct · line 832

Quoted 1 line
(quoted diff) +1 -0
+			++ retries;

++retries

Zdenek