From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/gfs_controld main.c recover.c
Date: 26 Apr 2007 19:01:36 -0000 [thread overview]
Message-ID: <20070426190136.18666.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2007-04-26 20:01:35
Modified files:
group/gfs_controld: main.c recover.c
Log message:
change some mount error conditions to log_error() instead of log_debug()
so they appear in syslog. Also set /proc/self/oom_adj.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.28&r2=1.29
--- cluster/group/gfs_controld/main.c 2006/12/20 19:13:13 1.28
+++ cluster/group/gfs_controld/main.c 2007/04/26 19:01:34 1.29
@@ -695,6 +695,18 @@
}
}
+void set_oom_adj(int val)
+{
+ FILE *fp;
+
+ fp = fopen("/proc/self/oom_adj", "w");
+ if (!fp)
+ return;
+
+ fprintf(fp, "%i", val);
+ fclose(fp);
+}
+
void set_scheduler(void)
{
struct sched_param sched_param;
@@ -725,6 +737,7 @@
daemonize();
set_scheduler();
+ set_oom_adj(-16);
return loop();
}
--- cluster/group/gfs_controld/recover.c 2006/12/20 19:13:13 1.28
+++ cluster/group/gfs_controld/recover.c 2007/04/26 19:01:34 1.29
@@ -1536,18 +1536,18 @@
fs with the same name (which is an error) */
if (strcmp(mg->dev, dev)) {
- log_group(mg, "different fs dev %s with same name", mg->dev);
+ log_error("different fs dev %s with same name", mg->dev);
return -EINVAL;
}
if (find_mountpoint(mg, dir)) {
- log_group(mg, "mount point %s already used", dir);
+ log_error("mount point %s already used", dir);
return -EBUSY;
}
/* we only really need to check one of these */
if (mg->mount_client || mg->mount_client_fd || !mg->kernel_mount_done) {
- log_group(mg, "other mount in progress client %d fd %d done %d",
+ log_error("other mount in progress client %d fd %d done %d",
mg->mount_client, mg->mount_client_fd,
mg->kernel_mount_done);
return -EBUSY;
next reply other threads:[~2007-04-26 19:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 19:01 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-26 19:01 [Cluster-devel] cluster/group/gfs_controld main.c recover.c 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=20070426190136.18666.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 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 NNTP newsgroup(s).