LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-01-31 19:52:41
Modified files:
. : WHATS_NEW daemons/clvmd : clvmd-command.c lib/locking : file_locking.c locking.c
Added files:
test : t-vgchange-sysinit.sh
Log message:
Fix udev synchronization for no-locking mode
Instead of implicitly syncing udev operation in clustered and file locking code - call synchronization directly in lock_vol() when the operation unlocks VG
The problem is missing implicit fs_unlock() in the no_locking code. This is used with --sysinit on read-only filesystem locking dir. In this case vgchange -ay could exit before all udev nodes are properly synchronised and may cause problems with accessing such node right after vgchange --sysinint command is finished.
Add test case for vgchange --sysinit.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1895&r2=1.1896
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.49&r2=1.50
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.54&r2=1.55
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.89&r2=1.90
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-vgchange-sysinit.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.83 - =================================== + Fix udev synchronization with no-locking --sysinit (2.02.80). Updating man pages for pvcreate, pvremove, pvresize, pvscan. Avoid rebuilding of uuid validation table. Always use O_DIRECT when opening block devices to check for partitioning.
daemons/clvmd/clvmd-command.c +0 -1
@@ -217,7 +217,6 @@if (lkid ==0 )return EINVAL ; -lvm_do_fs_unlock ();/* Wait for devices */ status =sync_unlock (lockname, lkid);if (status) status = errno;
lib/locking/file_locking.c +0 -1
@@ -215,7 +215,6 @@ state ='W' ;break ;case LCK_UNLOCK : -fs_unlock ();/* Wait until devices are available */ return _release_lock (file,1 );default :log_error ("Unrecognised lock type: %d" , flags &LCK_TYPE_MASK );
lib/locking/locking.c +4 -0
@@ -442,6 +442,10 @@/* If LVM1 driver knows about the VG, it can't be accessed. */ if (!check_lvm1_vg_inactive (cmd, vol)) return_0; + +/* Before unlocking VG wait until devices are available. */ +if ((flags &LCK_TYPE_MASK ) ==LCK_UNLOCK ) +sync_local_dev_names (cmd);break ;case LCK_LV :/* All LV locks are non-blocking. */
/cvs/lvm2/LVM2/test/t-vgchange-sysinit.sh,v --> standard output revision 1.1
- renamed from test/t-vgchange-sysinit.sh +50 -0
50 lines not on this page · raw message