public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/locking/file_locking.c li ...
@ 2004-05-05 12:03 agk
0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2004-05-05 12:03 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2004-05-05 12:03:07
Modified files:
. : WHATS_NEW
lib/locking : file_locking.c locking.c locking.h no_locking.c
tools : lvchange.c lvcreate.c lvremove.c lvrename.c
lvresize.c pvmove.c vgchange.c vgreduce.c
Log message:
Revise internal locking semantics.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.20&r2=1.21
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.17&r2=1.18
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.h.diff?cvsroot=lvm2&r1=1.18&r2=1.19
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/locking/no_locking.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvchange.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvcreate.c.diff?cvsroot=lvm2&r1=1.78&r2=1.79
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvremove.c.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvrename.c.diff?cvsroot=lvm2&r1=1.31&r2=1.32
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/lvresize.c.diff?cvsroot=lvm2&r1=1.48&r2=1.49
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/pvmove.c.diff?cvsroot=lvm2&r1=1.13&r2=1.14
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/vgchange.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/vgreduce.c.diff?cvsroot=lvm2&r1=1.32&r2=1.33
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2 ./WHATS_NEW lib/locking/file_locking.c li ...
@ 2008-04-07 19:17 mbroz
0 siblings, 0 replies; 2+ messages in thread
From: mbroz @ 2008-04-07 19:17 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2008-04-07 19:17:30
Modified files:
. : WHATS_NEW
lib/locking : file_locking.c locking.c no_locking.c
Log message:
Update lvmcache VG lock state for all locking types now.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.827&r2=1.828
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/file_locking.c.diff?cvsroot=lvm2&r1=1.35&r2=1.36
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.44&r2=1.45
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/no_locking.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15
--- LVM2/WHATS_NEW 2008/04/07 13:53:26 1.827
+++ LVM2/WHATS_NEW 2008/04/07 19:17:29 1.828
@@ -1,5 +1,6 @@
Version 2.02.34 -
===================================
+ Update lvmcache VG lock state for all locking types now.
Fix output if overriding command_names on cmdline.
Add detection of clustered mirror log capability.
Add check to vg_commit() ensuring VG lock held before writing new VG metadata.
--- LVM2/lib/locking/file_locking.c 2008/04/03 18:56:40 1.35
+++ LVM2/lib/locking/file_locking.c 2008/04/07 19:17:29 1.36
@@ -21,7 +21,6 @@
#include "defaults.h"
#include "lvm-file.h"
#include "lvm-string.h"
-#include "lvmcache.h"
#include <limits.h>
#include <unistd.h>
@@ -222,16 +221,6 @@
if (!_lock_file(lockfile, flags))
return_0;
-
- switch (flags & LCK_TYPE_MASK) {
- case LCK_UNLOCK:
- lvmcache_unlock_vgname(resource);
- break;
- default:
- lvmcache_lock_vgname(resource,
- (flags & LCK_TYPE_MASK) ==
- LCK_READ);
- }
break;
case LCK_LV:
switch (flags & LCK_TYPE_MASK) {
--- LVM2/lib/locking/locking.c 2008/01/30 13:59:59 1.44
+++ LVM2/lib/locking/locking.c 2008/04/07 19:17:29 1.45
@@ -21,6 +21,7 @@
#include "toolcontext.h"
#include "memlock.h"
#include "defaults.h"
+#include "lvmcache.h"
#include <signal.h>
#include <sys/stat.h>
@@ -315,22 +316,29 @@
*/
static int _lock_vol(struct cmd_context *cmd, const char *resource, uint32_t flags)
{
+ int ret = 0;
+
_block_signals(flags);
_lock_memory(flags);
assert(resource);
- if (!(_locking.lock_resource(cmd, resource, flags))) {
- _unlock_memory(flags);
- _unblock_signals();
- return 0;
+ if ((ret = _locking.lock_resource(cmd, resource, flags))) {
+ if ((flags & LCK_SCOPE_MASK) == LCK_VG) {
+ if ((flags & LCK_TYPE_MASK) == LCK_UNLOCK)
+ lvmcache_unlock_vgname(resource);
+ else
+ lvmcache_lock_vgname(resource, (flags & LCK_TYPE_MASK)
+ == LCK_READ);
+ }
+
+ _update_vg_lock_count(flags);
}
- _update_vg_lock_count(flags);
_unlock_memory(flags);
_unblock_signals();
- return 1;
+ return ret;
}
int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags)
--- LVM2/lib/locking/no_locking.c 2008/01/30 13:59:59 1.14
+++ LVM2/lib/locking/no_locking.c 2008/04/07 19:17:29 1.15
@@ -18,7 +18,6 @@
#include "locking_types.h"
#include "lvm-string.h"
#include "activate.h"
-#include "lvmcache.h"
#include <signal.h>
@@ -41,15 +40,6 @@
{
switch (flags & LCK_SCOPE_MASK) {
case LCK_VG:
- switch (flags & LCK_TYPE_MASK) {
- case LCK_UNLOCK:
- lvmcache_unlock_vgname(resource);
- break;
- default:
- lvmcache_lock_vgname(resource,
- (flags & LCK_TYPE_MASK) ==
- LCK_READ);
- }
break;
case LCK_LV:
switch (flags & LCK_TYPE_MASK) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-07 19:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-05 12:03 LVM2 ./WHATS_NEW lib/locking/file_locking.c li agk
2008-04-07 19:17 mbroz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).