* LVM2/daemons/clvmd lvm-functions.c
@ 2006-10-24 18:49 jbrassow
0 siblings, 0 replies; 10+ messages in thread
From: jbrassow @ 2006-10-24 18:49 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow at sourceware.org 2006-10-24 18:49:31
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
- likely cut and paste error. Fix wrong function name in debug
output.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.24&r2=1.25
--- LVM2/daemons/clvmd/lvm-functions.c 2006/10/06 10:06:37 1.24
+++ LVM2/daemons/clvmd/lvm-functions.c 2006/10/24 18:49:31 1.25
@@ -243,7 +243,7 @@
/* Is it open ? */
oldmode = get_current_lock(resource);
if (oldmode == -1) {
- DEBUGLOG("do_deactivate_lock, lock not already held\n");
+ DEBUGLOG("do_resume_lv, lock not already held\n");
return 0; /* We don't need to do anything */
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2007-08-23 12:44 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-08-23 12:44 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: pcaulfield at sourceware.org 2007-08-23 12:44:10
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
Force a device scan after init_full_scan_done() per agk.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.32&r2=1.33
--- LVM2/daemons/clvmd/lvm-functions.c 2007/08/23 12:19:13 1.32
+++ LVM2/daemons/clvmd/lvm-functions.c 2007/08/23 12:44:09 1.33
@@ -42,6 +42,7 @@
/* LVM2 headers */
#include "toolcontext.h"
+#include "lvmcache.h"
#include "log.h"
#include "activate.h"
#include "locking.h"
@@ -448,6 +449,7 @@
ret = refresh_toolcontext(cmd);
init_full_scan_done(0);
+ lvmcache_label_scan(cmd, 2);
return ret==1?0:-1;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2007-11-14 13:37 pcaulfield
0 siblings, 0 replies; 10+ messages in thread
From: pcaulfield @ 2007-11-14 13:37 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: pcaulfield at sourceware.org 2007-11-14 13:37:51
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
Make it compile with new lv_info_by_lvid() prototype
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.34&r2=1.35
--- LVM2/daemons/clvmd/lvm-functions.c 2007/08/24 08:29:39 1.34
+++ LVM2/daemons/clvmd/lvm-functions.c 2007/11/14 13:37:51 1.35
@@ -223,7 +223,7 @@
}
/* If it's suspended then resume it */
- if (!lv_info_by_lvid(cmd, resource, &lvi, 0))
+ if (!lv_info_by_lvid(cmd, resource, &lvi, 0, 0))
return EIO;
if (lvi.suspended)
@@ -269,7 +269,7 @@
}
/* Only suspend it if it exists */
- if (!lv_info_by_lvid(cmd, resource, &lvi, 0))
+ if (!lv_info_by_lvid(cmd, resource, &lvi, 0, 0))
return EIO;
if (lvi.exists) {
@@ -414,7 +414,7 @@
struct lvinfo lvi;
pthread_mutex_lock(&lvm_lock);
- status = lv_info_by_lvid(cmd, resource, &lvi, 0);
+ status = lv_info_by_lvid(cmd, resource, &lvi, 0, 0);
pthread_mutex_unlock(&lvm_lock);
if (!status)
return EIO;
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2008-06-06 16:37 agk
0 siblings, 0 replies; 10+ messages in thread
From: agk @ 2008-06-06 16:37 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2008-06-06 16:37:52
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
cleaner LCK_LV decoding
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44
--- LVM2/daemons/clvmd/lvm-functions.c 2008/06/05 14:24:28 1.43
+++ LVM2/daemons/clvmd/lvm-functions.c 2008/06/06 16:37:51 1.44
@@ -61,6 +61,8 @@
int lock_mode;
};
+#define LCK_MASK (LCK_TYPE_MASK | LCK_SCOPE_MASK)
+
static const char *decode_locking_cmd(unsigned char cmdl)
{
static char buf[128];
@@ -104,23 +106,20 @@
break;
}
- switch (cmdl) {
- case LCK_LV_EXCLUSIVE:
+ switch (cmdl & LCK_MASK) {
+ case LCK_LV_EXCLUSIVE & LCK_MASK:
command = "LCK_LV_EXCLUSIVE";
break;
- case LCK_LV_SUSPEND:
+ case LCK_LV_SUSPEND & LCK_MASK:
command = "LCK_LV_SUSPEND";
break;
- case LCK_LV_UNLOCK:
- command = "LCK_LV_UNLOCK";
- break;
- case LCK_LV_RESUME:
+ case LCK_LV_RESUME & LCK_MASK:
command = "LCK_LV_RESUME";
break;
- case LCK_LV_ACTIVATE:
+ case LCK_LV_ACTIVATE & LCK_MASK:
command = "LCK_LV_ACTIVATE";
break;
- case LCK_LV_DEACTIVATE:
+ case LCK_LV_DEACTIVATE & LCK_MASK:
command = "LCK_LV_DEACTIVATE";
break;
default:
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2009-12-09 19:30 mbroz
0 siblings, 0 replies; 10+ messages in thread
From: mbroz @ 2009-12-09 19:30 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-12-09 19:30:56
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
Fix missing include.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.77&r2=1.78
--- LVM2/daemons/clvmd/lvm-functions.c 2009/12/09 19:01:28 1.77
+++ LVM2/daemons/clvmd/lvm-functions.c 2009/12/09 19:30:56 1.78
@@ -52,6 +52,7 @@
#include "locking.h"
#include "archiver.h"
#include "defaults.h"
+#include "memlock.h"
static struct cmd_context *cmd = NULL;
static struct dm_hash_table *lv_hash = NULL;
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2010-06-30 21:40 mornfall
0 siblings, 0 replies; 10+ messages in thread
From: mornfall @ 2010-06-30 21:40 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2010-06-30 21:40:27
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
Maintain memlock balance in clvmd.
When a mirror is being downconverted in a cluster, a series of suspends and
resumes is executed.
With the change to using UUIDs in dev_manager instead of names, the behaviour
has changed with regards to including an _mlog in the deptree of a logical
volume. In the old (pre-UUID-enabled) code, the _mlog would appear in a deptree
of any volume purely based on a name match: a linear volume foo would include
foo_mlog in its dependencies if that happened to exist. This behaviour was
fixed and the mlog is now only included for mirrors.
By a coincidence, this mlog bug had been hiding a different bug in clvmd. When
a mirror is being dismantled (and converted to a linear volume), it is first
suspended as a whole, then later resumed in parts. Nevertheless, the overall
memlock balance is maintained in this operation. The problem kicks in, because
even though the mirror log was suspended as part of the mirror, when the
dismantled mirror is resumed again, it is no longer a mirror and therefore the
mirror log stays suspended. This would not be a problem in itself, since
_delete_lv (from metadata/mirror.c) is called on it subsequently, which does an
activate/deactivate cycle and removes the LV. The activate/deactivate cycle
correctly prompts clvmd to resume the device: however, in doing this, it will
issue an unpaired resume operation (the suspend that caused the mirror log to
be suspended is paired with resuming the dismantled mirror later). We have
concluded that the path in clvmd should never affect memlock_count, since there
should never be an unmatched explicit suspend preceding this resume.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.94&r2=1.95
--- LVM2/daemons/clvmd/lvm-functions.c 2010/06/21 15:56:58 1.94
+++ LVM2/daemons/clvmd/lvm-functions.c 2010/06/30 21:40:27 1.95
@@ -354,9 +354,13 @@
if (!lv_info_by_lvid(cmd, resource, &lvi, 0, 0))
goto error;
- if (lvi.suspended)
- if (!lv_resume(cmd, resource))
+ if (lvi.suspended) {
+ memlock_inc(cmd);
+ if (!lv_resume(cmd, resource)) {
+ memlock_dec(cmd);
goto error;
+ }
+ }
/* Now activate it */
if (!lv_activate(cmd, resource, exclusive))
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2010-11-29 11:05 zkabelac
2010-11-29 17:40 ` Alasdair G Kergon
0 siblings, 1 reply; 10+ messages in thread
From: zkabelac @ 2010-11-29 11:05 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-11-29 11:05:15
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
Remove printing of LCK_CACHE
LCK_CACHE is defined as 0x100 so it cannot be passed through
unsigned char parameter - remove it from the sprintf code.
If the LCK_CLUSTER should be printed here - lot of code need
to be reworked - so adding FIXME comment.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.100&r2=1.101
--- LVM2/daemons/clvmd/lvm-functions.c 2010/11/23 01:55:58 1.100
+++ LVM2/daemons/clvmd/lvm-functions.c 2010/11/29 11:05:15 1.101
@@ -44,6 +44,10 @@
int lock_mode;
};
+/*
+ * FIXME: 8bit value passed here -
+ * so only LCK_XXX defines < 0x100 can be decoded
+ */
static const char *decode_locking_cmd(unsigned char cmdl)
{
static char buf[128];
@@ -109,12 +113,11 @@
break;
}
- sprintf(buf, "0x%x %s (%s|%s%s%s%s%s%s)", cmdl, command, type, scope,
+ sprintf(buf, "0x%x %s (%s|%s%s%s%s%s)", cmdl, command, type, scope,
cmdl & LCK_NONBLOCK ? "|NONBLOCK" : "",
cmdl & LCK_HOLD ? "|HOLD" : "",
cmdl & LCK_LOCAL ? "|LOCAL" : "",
- cmdl & LCK_CLUSTER_VG ? "|CLUSTER_VG" : "",
- cmdl & LCK_CACHE ? "|CACHE" : "");
+ cmdl & LCK_CLUSTER_VG ? "|CLUSTER_VG" : "");
return buf;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
2010-11-29 11:05 zkabelac
@ 2010-11-29 17:40 ` Alasdair G Kergon
0 siblings, 0 replies; 10+ messages in thread
From: Alasdair G Kergon @ 2010-11-29 17:40 UTC (permalink / raw)
To: lvm-devel
On Mon, Nov 29, 2010 at 11:05:15AM -0000, zkabelac at sourceware.org wrote:
> Remove printing of LCK_CACHE
But straightforward to fix so it still gets printed (somewhere)?
> If the LCK_CLUSTER should be printed here - lot of code need
> to be reworked - so adding FIXME comment.
With code like:
(lock_flags & LCK_CLUSTER_VG)
LCK_CLUSTER_VG (I presume you meant) should it be handled by decode_flags?
> + * FIXME: 8bit value passed here -
> + * so only LCK_XXX defines < 0x100 can be decoded
(Not really the thing to fix.)
Alasdair
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2012-03-01 21:18 zkabelac
0 siblings, 0 replies; 10+ messages in thread
From: zkabelac @ 2012-03-01 21:18 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-03-01 21:18:39
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
Debug log for hold_lock failure
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.131&r2=1.132
--- LVM2/daemons/clvmd/lvm-functions.c 2012/03/01 09:54:24 1.131
+++ LVM2/daemons/clvmd/lvm-functions.c 2012/03/01 21:18:38 1.132
@@ -767,7 +767,8 @@
LCK_EXCL : LCK_READ;
DEBUGLOG("getting initial lock for %s\n", uuid);
- hold_lock(uuid, lock_mode, LCKF_NOQUEUE);
+ if (hold_lock(uuid, lock_mode, LCKF_NOQUEUE))
+ DEBUGLOG("Failed to hold lock %s\n", uuid);
}
}
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* LVM2/daemons/clvmd lvm-functions.c
@ 2012-03-01 22:55 zkabelac
0 siblings, 0 replies; 10+ messages in thread
From: zkabelac @ 2012-03-01 22:55 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-03-01 22:55:21
Modified files:
daemons/clvmd : lvm-functions.c
Log message:
Add traceback for failpath
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.132&r2=1.133
--- LVM2/daemons/clvmd/lvm-functions.c 2012/03/01 21:18:38 1.132
+++ LVM2/daemons/clvmd/lvm-functions.c 2012/03/01 22:55:21 1.133
@@ -729,7 +729,7 @@
if (dm_asprintf(&lvs_cmd, "%s lvs --config 'log{command_names=0 prefix=\"\"}' "
"--nolocking --noheadings -o vg_uuid,lv_uuid,lv_attr,vg_attr",
lvm_binary) < 0)
- return 0;
+ return_0;
/* FIXME: Maybe link and use liblvm2cmd directly instead of fork */
if (!(lvs = popen(lvs_cmd, "r"))) {
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-03-01 22:55 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 21:18 LVM2/daemons/clvmd lvm-functions.c zkabelac
-- strict thread matches above, loose matches on Subject: below --
2012-03-01 22:55 zkabelac
2010-11-29 11:05 zkabelac
2010-11-29 17:40 ` Alasdair G Kergon
2010-06-30 21:40 mornfall
2009-12-09 19:30 mbroz
2008-06-06 16:37 agk
2007-11-14 13:37 pcaulfield
2007-08-23 12:44 pcaulfield
2006-10-24 18:49 jbrassow
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.