From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2/mount util.c
Date: 19 Jul 2007 20:22:09 -0000 [thread overview]
Message-ID: <20070719202209.2316.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2007-07-19 20:22:09
Modified files:
gfs2/mount : util.c
Log message:
more helpful error reporting (sync with HEAD)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.6&r2=1.18.2.7
--- cluster/gfs2/mount/util.c 2007/06/06 15:51:11 1.18.2.6
+++ cluster/gfs2/mount/util.c 2007/07/19 20:22:08 1.18.2.7
@@ -327,8 +327,11 @@
int rv, fd;
fd = socket(PF_UNIX, SOCK_STREAM, 0);
- if (fd < 0)
+ if (fd < 0) {
+ warn("can't create socket for gfs_controld connection: %s",
+ strerror(errno));
goto out;
+ }
memset(&sun, 0, sizeof(sun));
sun.sun_family = AF_UNIX;
@@ -337,6 +340,7 @@
rv = connect(fd, (struct sockaddr *) &sun, addrlen);
if (rv < 0) {
+ warn("can't connect to gfs_controld: %s", strerror(errno));
close(fd);
fd = rv;
}
@@ -406,10 +410,8 @@
i = 0;
do {
fd = gfs_controld_connect();
- if (fd <= 0) {
- warn("waiting for gfs_controld to start");
+ if (fd <= 0)
sleep(1);
- }
} while (fd <= 0 && ++i < 10);
/* FIXME: should we start the daemon here? */
@@ -447,7 +449,7 @@
rv = write(fd, buf, sizeof(buf));
if (rv < 0) {
- warn("gfs_controld write error: %d", rv);
+ warn("gfs_controld write error: %s", strerror(errno));
goto out;
}
@@ -463,7 +465,8 @@
memset(buf, 0, sizeof(buf));
rv = read(fd, buf, sizeof(buf));
if (rv < 0) {
- warn("error reading result from gfs_controld: %d", rv);
+ warn("error reading result from gfs_controld: %s",
+ strerror(errno));
goto out;
}
rv = atoi(buf);
@@ -637,10 +640,8 @@
i = 0;
do {
fd = gfs_controld_connect();
- if (fd <= 0) {
- warn("waiting for gfs_controld to start");
+ if (fd <= 0)
sleep(1);
- }
} while (fd <= 0 && ++i < 10);
if (fd <= 0) {
@@ -717,10 +718,8 @@
i = 0;
do {
fd = gfs_controld_connect();
- if (fd <= 0) {
- warn("waiting for gfs_controld to start");
+ if (fd <= 0)
sleep(1);
- }
} while (fd <= 0 && ++i < 10);
if (fd <= 0) {
next reply other threads:[~2007-07-19 20:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 20:22 teigland [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-04 19:28 [Cluster-devel] cluster/gfs2/mount util.c teigland
2007-09-04 19:23 teigland
2007-06-28 17:58 teigland
2007-06-06 15:51 teigland
2007-06-06 15:45 teigland
2007-05-24 19:00 teigland
2007-05-24 19:00 teigland
2007-05-11 20:10 rpeterso
2007-05-11 20:04 rpeterso
2006-12-20 19:16 teigland
2006-12-20 19:15 teigland
2006-12-20 19:13 teigland
2006-12-05 22:27 teigland
2006-12-05 22:26 teigland
2006-12-05 22:25 teigland
2006-10-16 15:05 teigland
2006-10-13 22:01 rpeterso
2006-06-30 15:11 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=20070719202209.2316.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).