LVM2 ./WHATS_NEW lib/activate/activate.c lib/a ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow at sourceware.org 2011-10-06 14:55:40
Modified files:
. : WHATS_NEW lib/activate : activate.c activate.h lib/metadata : mirror.c
Log message:
Fix splitmirror in cluster having different DM/LVM views of storage. This patch also does some clean-up of the splitmirrors code.
I've attempted to clean-up the splitmirrors code to make it easier to understand with fewer operations. I've tried to reduce the number of metadata operations without compromising the intermediate stages which are necessary for easy clean-up in the even of failure.
These changes now correctly handle cluster situations - including exclusive cluster mirrors. Whereas before, a splitmirror operation would result in remote nodes having LVM commands report the newly split LV with a proper name while DM commands would report the old (pre-split) names of the device. IOW, there was a kernel/userspace mismatch.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2148&r2=1.2149
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.216&r2=1.217
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.h.diff?cvsroot=lvm2&r1=1.82&r2=1.83
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.172&r2=1.173
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.89 - ================================== + Fix splitmirror in cluster having different DM/LVM views of storage. Fix improper udev settings during suspend/resume for mirror sub-LVs. Fix vgsplit when there are mirrors that have mirrored logs. Clarify multi-name device filter pattern matching explanation in lvm.conf.5.
lib/activate/activate.c +17 -0
@@ -230,10 +230,19 @@void activation_exit (void ) { } +int lv_is_active (struct logical_volume *lv) {return 0 ; } +int lv_is_active_but_not_locally (struct logical_volume *lv) +{ +return 0 ; +} +int lv_is_active_exclusive (struct logical_volume *lv) +{ +return 0 ; +}int lv_is_active_exclusive_locally (struct logical_volume *lv) {return 0 ;
@@ -242,6 +251,7 @@ {return 0 ; } +int lv_check_transient (struct logical_volume *lv) {return 1 ;
@@ -873,6 +883,13 @@return _lv_is_active (lv, &l,NULL ) && !l; } +int lv_is_active_exclusive (struct logical_volume *lv) +{ +int e; + +return _lv_is_active (lv,NULL , &e) && e; +} +int lv_is_active_exclusive_locally (struct logical_volume *lv) {int l, e;
lib/activate/activate.h +1 -0
@@ -109,6 +109,7 @@int lv_is_active (struct logical_volume *lv);int lv_is_active_but_not_locally (struct logical_volume *lv); +int lv_is_active_exclusive (struct logical_volume *lv);int lv_is_active_exclusive_locally (struct logical_volume *lv);int lv_is_active_exclusive_remotely (struct logical_volume *lv);
lib/metadata/mirror.c +102 -103
257 lines not on this page · raw message