Skip to contentSkip to conversation

cluster/gfs2/mount mount.gfs2.c util.c util.h

Cluster-devel [email protected] 1 participant 1 message Oct 13, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-13 20:01:19

Modified files:
gfs2/mount : mount.gfs2.c util.c util.h

Log message:
The corresponding changes to the gfs_controld changes in handling mixed mounts and recoveries and failed mounts. We now tell gfs_controld when our mount has completed and the result using the same connection that we created when requesting the mount.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/mount.gfs2.c.diff?cvsroot=cluster&r1=1.17&r2=1.18
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.c.diff?cvsroot=cluster&r1=1.13&r2=1.14
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/util.h.diff?cvsroot=cluster&r1=1.9&r2=1.10

gfs2/mount/mount.gfs2.c +10 -1
@@ -130,6 +130,13 @@
 	return rv;
 }
 
+static void mount_result_lockproto(char *proto, struct mount_options *mo,
+			     	    struct gen_sb *sb, int result)
+{
+	if (!strcmp(proto, "lock_dlm"))
+		lock_dlm_mount_result(mo, sb, result);
+}
+
 static void umount_lockproto(char *proto, struct mount_options *mo,
 			     struct gen_sb *sb, int mnterr)
 {
@@ -175,14 +182,16 @@
 	rv = mount(mo.dev, mo.dir, fsname, mo.flags, mo.extra_plus);
 	if (rv) {
 		log_debug("mount(2) failed error %d errno %d", rv, errno);
+		mount_result_lockproto(proto, &mo, &sb, rv);
+
 		if (!(mo.flags & MS_REMOUNT))
 			umount_lockproto(proto, &mo, &sb, errno);
 
 		block_signals(SIG_UNBLOCK);
-
 		die("error %d mounting %s on %s\n", errno, mo.dev, mo.dir);
 	}
 	log_debug("mount(2) ok");
+	mount_result_lockproto(proto, &mo, &sb, 0);
 
 	block_signals(SIG_UNBLOCK);
 
gfs2/mount/util.c +42 -6

111 lines not on this page · raw message

gfs2/mount/util.h +1 -0
@@ -87,6 +87,7 @@
 void read_proc_mounts(struct mount_options *mo);
 int get_sb(char *device, struct gen_sb *sb_out);
 int lock_dlm_join(struct mount_options *mo, struct gen_sb *sb);
+void lock_dlm_mount_result(struct mount_options *mo, struct gen_sb *sb, int result);
 int lock_dlm_leave(struct mount_options *mo, struct gen_sb *sb, int mnterr);
 int lock_dlm_remount(struct mount_options *mo, struct gen_sb *sb);