* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-06-30 15:11 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-06-30 15:11 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-06-30 15:11:39
Modified files:
gfs2/mount : util.c
Log message:
gfs_controld_connect error values are < 0, not 0
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.10&r2=1.11
--- cluster/gfs2/mount/util.c 2006/05/25 14:56:18 1.10
+++ cluster/gfs2/mount/util.c 2006/06/30 15:11:39 1.11
@@ -320,12 +320,12 @@
do {
sleep(1);
fd = gfs_controld_connect();
- if (!fd)
+ if (fd < 0)
warn("waiting for gfs_controld to start");
- } while (!fd && ++i < 10);
+ } while (fd < 0 && ++i < 10);
/* FIXME: should we start the daemon here? */
- if (!fd) {
+ if (fd < 0) {
warn("gfs_controld not running");
rv = -1;
goto out;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-10-13 22:01 rpeterso
0 siblings, 0 replies; 19+ messages in thread
From: rpeterso @ 2006-10-13 22:01 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2006-10-13 22:01:40
Modified files:
gfs2/mount : util.c
Log message:
This is a fix for bugzilla bug 210300: Unknown mount option
"users". The gfs and gfs2 mount helper (/sbin/mount.gfs2)
was aborting if it saw mount options that are not part of
mount.h (i.e. internal to mount and vfs). The fix is to add
the missing options so the mount helper will recognize them
properly.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.14&r2=1.15
--- cluster/gfs2/mount/util.c 2006/10/13 20:01:19 1.14
+++ cluster/gfs2/mount/util.c 2006/10/13 22:01:40 1.15
@@ -45,6 +45,18 @@
{ "noatime", 0, 0, MS_NOATIME }, /* Do not update access time */
{ "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */
{ "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
+
+ /* options used by the mount command only (not in sys/mount.h): */
+ { "dirsync", 0, 0, 0 }, /* synchronous directory modifications */
+ { "loop", 1, 0, 0 }, /* use a loop device */
+ { "auto", 0, 1, 0 }, /* Can be mounted using -a */
+ { "noauto", 0, 0, 0 }, /* Can only be mounted explicitly */
+ { "users", 0, 0, 0 }, /* Allow ordinary user to mount */
+ { "nousers", 0, 1, 0 }, /* Forbid ordinary user to mount */
+ { "user", 0, 0, 0 }, /* Allow ordinary user to mount */
+ { "nouser", 0, 1, 0 }, /* Forbid ordinary user to mount */
+ { "owner", 0, 0, 0 }, /* Let the owner of the device mount */
+ { "noowner", 0, 1, 0 }, /* Device owner has no special privs */
{ NULL, 0, 0, 0 }
};
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-10-16 15:05 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-10-16 15:05 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-16 15:05:30
Modified files:
gfs2/mount : util.c
Log message:
fix style badness
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.16&r2=1.17
--- cluster/gfs2/mount/util.c 2006/10/14 20:16:19 1.16
+++ cluster/gfs2/mount/util.c 2006/10/16 15:05:30 1.17
@@ -521,8 +521,10 @@
int rv;
char buf[MAXLINE];
- if(gfs_controld_fd <= 0) /* if we didn't do the lock_dlm_join */
- return; /* forget the rest */
+ /* if we didn't do the lock_dlm_join */
+ if (gfs_controld_fd <= 0)
+ return;
+
memset(buf, 0, sizeof(buf));
rv = snprintf(buf, MAXLINE, "mount_result %s %s %d", mo->dir, fsname,
result);
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-12-05 22:25 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-12-05 22:25 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-12-05 22:25:29
Modified files:
gfs2/mount : util.c
Log message:
Pass gfs_controld the device being mounted, it'll use this if it
needs to withdraw the fs.
bz 215962
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.18&r2=1.19
--- cluster/gfs2/mount/util.c 2006/10/25 06:24:43 1.18
+++ cluster/gfs2/mount/util.c 2006/12/05 22:25:29 1.19
@@ -409,12 +409,12 @@
/*
* send request to gfs_controld for it to join mountgroup:
- * "join <mountpoint> gfs2 lock_dlm <locktable> <options>"
+ * "join <mountpoint> gfs2 lock_dlm <locktable> <options> <dev>"
*/
memset(buf, 0, sizeof(buf));
- rv = snprintf(buf, MAXLINE, "join %s %s %s %s %s",
- dir, fsname, proto, table, options);
+ 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);
rv = -1;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-12-05 22:26 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-12-05 22:26 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-12-05 22:26:58
Modified files:
gfs2/mount : util.c
Log message:
Pass gfs_controld the device being mounted, it'll use this if it
needs to withdraw the fs.
bz 215962
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18&r2=1.18.2.1
--- cluster/gfs2/mount/util.c 2006/10/25 06:24:43 1.18
+++ cluster/gfs2/mount/util.c 2006/12/05 22:26:58 1.18.2.1
@@ -409,12 +409,12 @@
/*
* send request to gfs_controld for it to join mountgroup:
- * "join <mountpoint> gfs2 lock_dlm <locktable> <options>"
+ * "join <mountpoint> gfs2 lock_dlm <locktable> <options> <dev>"
*/
memset(buf, 0, sizeof(buf));
- rv = snprintf(buf, MAXLINE, "join %s %s %s %s %s",
- dir, fsname, proto, table, options);
+ 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);
rv = -1;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-12-05 22:27 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-12-05 22:27 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-12-05 22:27:04
Modified files:
gfs2/mount : util.c
Log message:
Pass gfs_controld the device being mounted, it'll use this if it
needs to withdraw the fs.
bz 215962
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.18&r2=1.18.4.1
--- cluster/gfs2/mount/util.c 2006/10/25 06:24:43 1.18
+++ cluster/gfs2/mount/util.c 2006/12/05 22:27:04 1.18.4.1
@@ -409,12 +409,12 @@
/*
* send request to gfs_controld for it to join mountgroup:
- * "join <mountpoint> gfs2 lock_dlm <locktable> <options>"
+ * "join <mountpoint> gfs2 lock_dlm <locktable> <options> <dev>"
*/
memset(buf, 0, sizeof(buf));
- rv = snprintf(buf, MAXLINE, "join %s %s %s %s %s",
- dir, fsname, proto, table, options);
+ 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);
rv = -1;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-12-20 19:13 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-12-20 19:13 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-12-20 19:13:35
Modified files:
gfs2/mount : util.c
Log message:
Support mounting a single fs on multiple mount points.
bz 218560
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.19&r2=1.20
--- cluster/gfs2/mount/util.c 2006/12/05 22:25:29 1.19
+++ cluster/gfs2/mount/util.c 2006/12/20 19:13:35 1.20
@@ -12,6 +12,7 @@
extern char *fsname;
extern int verbose;
static int gfs_controld_fd = -1;
+static int adding_another_mountpoint;
#define LOCK_DLM_SOCK_PATH "gfs_controld_sock" /* FIXME: use a header */
#define MAXLINE 256 /* size of messages with gfs_controld */
@@ -446,6 +447,13 @@
goto out;
}
rv = atoi(buf);
+
+ if (rv == -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)
@@ -553,6 +561,9 @@
int i, fd, rv;
char buf[MAXLINE];
+ if (mnterr && adding_another_mountpoint)
+ return 0;
+
i = 0;
do {
fd = gfs_controld_connect();
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-12-20 19:15 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-12-20 19:15 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-12-20 19:15:08
Modified files:
gfs2/mount : util.c
Log message:
Support mounting a single fs on multiple mount points.
bz 218560
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.1&r2=1.18.2.2
--- cluster/gfs2/mount/util.c 2006/12/05 22:26:58 1.18.2.1
+++ cluster/gfs2/mount/util.c 2006/12/20 19:15:07 1.18.2.2
@@ -12,6 +12,7 @@
extern char *fsname;
extern int verbose;
static int gfs_controld_fd = -1;
+static int adding_another_mountpoint;
#define LOCK_DLM_SOCK_PATH "gfs_controld_sock" /* FIXME: use a header */
#define MAXLINE 256 /* size of messages with gfs_controld */
@@ -446,6 +447,13 @@
goto out;
}
rv = atoi(buf);
+
+ if (rv == -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)
@@ -553,6 +561,9 @@
int i, fd, rv;
char buf[MAXLINE];
+ if (mnterr && adding_another_mountpoint)
+ return 0;
+
i = 0;
do {
fd = gfs_controld_connect();
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2006-12-20 19:16 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2006-12-20 19:16 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-12-20 19:16:49
Modified files:
gfs2/mount : util.c
Log message:
Support mounting a single fs on multiple mount points.
bz 218560
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.18.4.1&r2=1.18.4.2
--- cluster/gfs2/mount/util.c 2006/12/05 22:27:04 1.18.4.1
+++ cluster/gfs2/mount/util.c 2006/12/20 19:16:49 1.18.4.2
@@ -12,6 +12,7 @@
extern char *fsname;
extern int verbose;
static int gfs_controld_fd = -1;
+static int adding_another_mountpoint;
#define LOCK_DLM_SOCK_PATH "gfs_controld_sock" /* FIXME: use a header */
#define MAXLINE 256 /* size of messages with gfs_controld */
@@ -446,6 +447,13 @@
goto out;
}
rv = atoi(buf);
+
+ if (rv == -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)
@@ -553,6 +561,9 @@
int i, fd, rv;
char buf[MAXLINE];
+ if (mnterr && adding_another_mountpoint)
+ return 0;
+
i = 0;
do {
fd = gfs_controld_connect();
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-05-11 20:04 rpeterso
0 siblings, 0 replies; 19+ messages in thread
From: rpeterso @ 2007-05-11 20:04 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2007-05-11 20:04:30
Modified files:
gfs2/mount : util.c
Log message:
Resolves: Bugzilla Bug 239844: mount.gfs2 doesn't work when _netdev
is used in /etc/fstab.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.21&r2=1.22
--- cluster/gfs2/mount/util.c 2007/01/02 20:18:03 1.21
+++ cluster/gfs2/mount/util.c 2007/05/11 20:04:30 1.22
@@ -58,6 +58,7 @@
{ "nouser", 0, 1, 0 }, /* Forbid ordinary user to mount */
{ "owner", 0, 0, 0 }, /* Let the owner of the device mount */
{ "noowner", 0, 1, 0 }, /* Device owner has no special privs */
+ { "_netdev", 0, 0, 0 }, /* Network device required (netfs) */
{ NULL, 0, 0, 0 }
};
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-05-11 20:10 rpeterso
0 siblings, 0 replies; 19+ messages in thread
From: rpeterso @ 2007-05-11 20:10 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: rpeterso at sourceware.org 2007-05-11 20:10:37
Modified files:
gfs2/mount : util.c
Log message:
Resolves: Bugzilla Bug 239844: mount.gfs2 doesn't work when _netdev
is used in /etc/fstab.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.3&r2=1.18.2.4
--- cluster/gfs2/mount/util.c 2007/01/02 20:18:44 1.18.2.3
+++ cluster/gfs2/mount/util.c 2007/05/11 20:10:36 1.18.2.4
@@ -58,6 +58,7 @@
{ "nouser", 0, 1, 0 }, /* Forbid ordinary user to mount */
{ "owner", 0, 0, 0 }, /* Let the owner of the device mount */
{ "noowner", 0, 1, 0 }, /* Device owner has no special privs */
+ { "_netdev", 0, 0, 0 }, /* Network device required (netfs) */
{ NULL, 0, 0, 0 }
};
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-05-24 19:00 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-05-24 19:00 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2007-05-24 19:00:02
Modified files:
gfs2/mount : util.c
Log message:
don't do gfs_sb_print() if we don't detect a gfs fs, it often just
prints a bunch of garbage
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.4&r2=1.18.2.5
--- cluster/gfs2/mount/util.c 2007/05/11 20:10:36 1.18.2.4
+++ cluster/gfs2/mount/util.c 2007/05/24 19:00:02 1.18.2.5
@@ -292,7 +292,6 @@
if (sb.sb_header.mh_magic != GFS_MAGIC ||
sb.sb_header.mh_type != GFS_METATYPE_SB) {
- gfs_sb_print(&sb);
die("there isn't a GFS filesystem on %s\n", device);
}
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-05-24 19:00 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-05-24 19:00 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2007-05-24 19:00:20
Modified files:
gfs2/mount : util.c
Log message:
don't do gfs_sb_print() if we don't detect a gfs fs, it often just
prints a bunch of garbage
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.22&r2=1.23
--- cluster/gfs2/mount/util.c 2007/05/11 20:04:30 1.22
+++ cluster/gfs2/mount/util.c 2007/05/24 19:00:17 1.23
@@ -292,7 +292,6 @@
if (sb.sb_header.mh_magic != GFS_MAGIC ||
sb.sb_header.mh_type != GFS_METATYPE_SB) {
- gfs_sb_print(&sb);
die("there isn't a GFS filesystem on %s\n", device);
}
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-06-06 15:45 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-06-06 15:45 UTC (permalink / raw)
To: cluster-devel.redhat.com
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;
}
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-06-06 15:51 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-06-06 15:51 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2007-06-06 15:51: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&only_with_tag=RHEL5&r1=1.18.2.5&r2=1.18.2.6
--- cluster/gfs2/mount/util.c 2007/05/24 19:00:02 1.18.2.5
+++ cluster/gfs2/mount/util.c 2007/06/06 15:51:11 1.18.2.6
@@ -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;
}
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-06-28 17:58 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-06-28 17:58 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2007-06-28 17:58:31
Modified files:
gfs2/mount : util.c
Log message:
- add more specific warnings/errors when connecting to gfs_controld fails
- use strerror to report more helpful error messages in a few spots
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.24&r2=1.25
--- cluster/gfs2/mount/util.c 2007/06/06 15:45:11 1.24
+++ cluster/gfs2/mount/util.c 2007/06/28 17:58:31 1.25
@@ -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) {
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-07-19 20:22 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-07-19 20:22 UTC (permalink / raw)
To: cluster-devel.redhat.com
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) {
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-09-04 19:23 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-09-04 19:23 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2007-09-04 19:23:38
Modified files:
gfs2/mount : util.c
Log message:
report that a mount fails due to an in-progress unmount
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.25&r2=1.26
--- cluster/gfs2/mount/util.c 2007/06/28 17:58:31 1.25
+++ cluster/gfs2/mount/util.c 2007/09/04 19:23:38 1.26
@@ -497,6 +497,10 @@
warn("fs name too long");
goto out;
+ case -ESTALE:
+ warn("fs is being unmounted");
+ goto out;
+
case -EADDRINUSE:
warn("different fs appears to exist with the same name");
goto out;
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Cluster-devel] cluster/gfs2/mount util.c
@ 2007-09-04 19:28 teigland
0 siblings, 0 replies; 19+ messages in thread
From: teigland @ 2007-09-04 19:28 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2007-09-04 19:28:12
Modified files:
gfs2/mount : util.c
Log message:
report that a mount fails due to an in-progress unmount
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.7&r2=1.18.2.8
--- cluster/gfs2/mount/util.c 2007/07/19 20:22:08 1.18.2.7
+++ cluster/gfs2/mount/util.c 2007/09/04 19:28:11 1.18.2.8
@@ -497,6 +497,10 @@
warn("fs name too long");
goto out;
+ case -ESTALE:
+ warn("fs is being unmounted");
+ goto out;
+
case -EADDRINUSE:
warn("different fs appears to exist with the same name");
goto out;
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2007-09-04 19:28 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-04 19:23 [Cluster-devel] cluster/gfs2/mount util.c teigland
-- strict thread matches above, loose matches on Subject: below --
2007-09-04 19:28 teigland
2007-07-19 20:22 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
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).