All of lore.kernel.org
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2/mount util.c
Date: 6 Jun 2007 15:45:11 -0000	[thread overview]
Message-ID: <20070606154511.28670.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2007-06-06 15:45:11

Modified files:
	gfs2/mount     : util.c 

Log message:
	translate different error numbers from gfs_controld into specific,
	helpful error messages

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.23&r2=1.24

--- cluster/gfs2/mount/util.c	2007/05/24 19:00:17	1.23
+++ cluster/gfs2/mount/util.c	2007/06/06 15:45:11	1.24
@@ -437,7 +437,7 @@
 	rv = snprintf(buf, MAXLINE, "join %s %s %s %s %s %s",
 		      dir, fsname, proto, table, options, mo->dev);
 	if (rv >= MAXLINE) {
-		warn("lock_dlm_join: message too long: %d \"%s\"", rv, buf);
+		warn("gfs_controld message too long: %d \"%s\"", rv, buf);
 		rv = -1;
 		goto out;
 	}
@@ -447,7 +447,7 @@
 
 	rv = write(fd, buf, sizeof(buf));
 	if (rv < 0) {
-		warn("lock_dlm_join: gfs_controld write error: %d", rv);
+		warn("gfs_controld write error: %d", rv);
 		goto out;
 	}
 
@@ -463,23 +463,73 @@
 	memset(buf, 0, sizeof(buf));
 	rv = read(fd, buf, sizeof(buf));
 	if (rv < 0) {
-		warn("lock_dlm_join: gfs_controld read 1 error: %d", rv);
+		warn("error reading result from gfs_controld: %d", rv);
 		goto out;
 	}
 	rv = atoi(buf);
 
-	if (rv == -EALREADY) {
+	switch (rv) {
+	case 0:
+		break;
+
+	case -EEXIST:
+		warn("mount group already exists. "
+		     "Duplicate locktable name %s, or %s already mounted",
+		     table, mo->dev);
+		goto out;
+
+	case -EPROTONOSUPPORT:
+		warn("lockproto not supported");
+		goto out;
+
+	case -EOPNOTSUPP:
+		warn("jid, first and id are reserved options");
+		goto out;
+
+	case -EBADFD:
+		warn("no colon found in table name");
+		goto out;
+
+	case -ENAMETOOLONG:
+		warn("fs name too long");
+		goto out;
+
+	case -EADDRINUSE:
+		warn("different fs appears to exist with the same name");
+		goto out;
+
+	case -EBUSY:
+		warn("mount point already used or other mount in progress");
+		goto out;
+
+	case -EALREADY:
 		log_debug("fs already mounted, adding mountpoint");
 		adding_another_mountpoint = 1;
 		rv = 0;
 		goto out;
-	}
-	if (rv < 0) {
-		warn("lock_dlm_join: gfs_controld join error: %d", rv);
-		if (rv == -EEXIST)
-			warn("lock_dlm_join: mountgroup already exists. "
-			     "Duplicate locktable name %s, or %s already "
-			     "mounted\n", table, mo->dev);
+
+	case -ENOMEM:
+		warn("out of memory");
+		goto out;
+
+	case -EBADR:
+		warn("fs is for a different cluster");
+		goto out;
+
+	case -ENOANO:
+		warn("node not a member of the default fence domain");
+		goto out;
+
+	case -EROFS:
+		warn("read-only mount invalid with spectator option");
+		goto out;
+
+	case -EMLINK:
+		warn("option string too long");
+		goto out;
+
+	default:
+		warn("gfs_controld join error: %d", rv);
 		goto out;
 	}
 



             reply	other threads:[~2007-06-06 15:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-06 15:45 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-07-19 20:22 teigland
2007-06-28 17:58 teigland
2007-06-06 15:51 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=20070606154511.28670.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.