[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/gfs2/mount util.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland 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();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]