Skip to contentSkip to conversation

LVM2 daemons/clvmd/clvmd-command.c lib/locking ...

PATCH [email protected] 1 participant 1 message Feb 2, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-02-02 13:34:01

Modified files:
daemons/clvmd : clvmd-command.c
lib/locking : file_locking.c locking.c

Log message:
Revert wrong fix for nolock locking missing fs_unlock

Patch was wrond and introduced recursive lock_vol Reverting it.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.50&r2=1.51
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.55&r2=1.56
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.90&r2=1.91

daemons/clvmd/clvmd-command.c +1 -0
@@ -217,6 +217,7 @@
 	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 +1 -0
@@ -215,6 +215,7 @@
 		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 +0 -4
@@ -442,10 +442,6 @@
 		/* 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. */