From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/gfs_controld cpg.c lock_dlm.h ma ...
Date: 9 Aug 2006 19:35:26 -0000 [thread overview]
Message-ID: <20060809193526.3083.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-08-09 19:35:26
Modified files:
group/gfs_controld: cpg.c lock_dlm.h main.c plock.c
Log message:
don't send plock debugging to stdout with -D, use -P to get that now
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/cpg.c.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&r1=1.11&r2=1.12
--- cluster/group/gfs_controld/cpg.c 2006/07/31 18:37:07 1.5
+++ cluster/group/gfs_controld/cpg.c 2006/08/09 19:35:26 1.6
@@ -39,8 +39,10 @@
mg = find_mg(hd->name);
if (!mg) {
+ /*
log_error("cpg message from %d len %d no group %s",
nodeid, len, hd->name);
+ */
return;
}
--- cluster/group/gfs_controld/lock_dlm.h 2006/08/08 21:19:17 1.12
+++ cluster/group/gfs_controld/lock_dlm.h 2006/08/09 19:35:26 1.13
@@ -65,6 +65,7 @@
};
extern char *prog_name;
+extern int plock_debug_opt;
extern int daemon_debug_opt;
extern char daemon_debug_buf[256];
extern char dump_buf[DUMP_SIZE];
@@ -88,6 +89,13 @@
daemon_dump_save(); \
} while (0)
+#define log_plock(g, fmt, args...) \
+do { \
+ snprintf(daemon_debug_buf, 255, "%ld %s " fmt "\n", time(NULL), \
+ (g)->name, ##args); \
+ if (plock_debug_opt) fprintf(stderr, "%s", daemon_debug_buf); \
+} while (0)
+
#define log_error(fmt, args...) \
do { \
log_debug(fmt, ##args); \
--- cluster/group/gfs_controld/main.c 2006/07/31 18:37:07 1.7
+++ cluster/group/gfs_controld/main.c 2006/08/09 19:35:26 1.8
@@ -12,7 +12,7 @@
#include "lock_dlm.h"
-#define OPTION_STRING "DhVw"
+#define OPTION_STRING "DPhVw"
#define LOCKFILE_NAME "/var/run/gfs_controld.pid"
struct client {
@@ -473,6 +473,10 @@
daemon_debug_opt = 1;
break;
+ case 'P':
+ plock_debug_opt = 1;
+ break;
+
case 'h':
print_usage();
exit(EXIT_SUCCESS);
@@ -534,6 +538,7 @@
}
char *prog_name;
+int plock_debug_opt;
int daemon_debug_opt;
char daemon_debug_buf[256];
char dump_buf[DUMP_SIZE];
--- cluster/group/gfs_controld/plock.c 2006/08/08 21:19:17 1.11
+++ cluster/group/gfs_controld/plock.c 2006/08/09 19:35:26 1.12
@@ -308,7 +308,7 @@
goto fail;
}
- log_group(mg, "read plock %llx %s %s %llx-%llx %d/%u/%llx w %d",
+ log_plock(mg, "read plock %llx %s %s %llx-%llx %d/%u/%llx w %d",
info.number,
op_str(info.optype),
ex_str(info.optype, info.ex),
@@ -867,7 +867,7 @@
info_bswap_in(&info);
- log_group(mg, "receive plock %llx %s %s %llx-%llx %d/%u/%llx w %d",
+ log_plock(mg, "receive plock %llx %s %s %llx-%llx %d/%u/%llx w %d",
info.number,
op_str(info.optype),
ex_str(info.optype, info.ex),
@@ -985,7 +985,7 @@
section_len = count * sizeof(struct pack_plock);
- log_group(mg, "pack %llx count %d", r->number, count);
+ log_plock(mg, "pack %llx count %d", r->number, count);
}
int unpack_section_buf(struct mountgroup *mg, char *numbuf, int buflen)
@@ -1005,7 +1005,7 @@
INIT_LIST_HEAD(&r->waiters);
sscanf(numbuf, "r%llu", &r->number);
- log_group(mg, "unpack %llx count %d", r->number, count);
+ log_plock(mg, "unpack %llx count %d", r->number, count);
pp = (struct pack_plock *) §ion_buf;
next reply other threads:[~2006-08-09 19:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-09 19:35 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-12-05 22:11 [Cluster-devel] cluster/group/gfs_controld cpg.c lock_dlm.h ma teigland
2007-11-28 20:49 teigland
2006-06-15 15:27 teigland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060809193526.3083.qmail@sourceware.org \
--to=teigland@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.