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 mount.gfs2.c umount.gfs2.c  ...
Date: 20 Jul 2006 20:19:05 -0000	[thread overview]
Message-ID: <20060720201905.14805.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at sourceware.org	2006-07-20 20:19:04

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

Log message:
	when a kernel mount fails and we leave the mountgroup, we need to
	pass an error value with the unmount/leave so gfs_controld will know
	to not wait for the kernel mount to complete before doing the leave

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

--- cluster/gfs2/mount/mount.gfs2.c	2006/04/13 19:00:35	1.13
+++ cluster/gfs2/mount/mount.gfs2.c	2006/07/20 20:19:04	1.14
@@ -123,10 +123,10 @@
 }
 
 static void umount_lockproto(char *proto, struct mount_options *mo,
-			     struct gen_sb *sb)
+			     struct gen_sb *sb, int mnterr)
 {
 	if (!strcmp(proto, "lock_dlm"))
-		lock_dlm_leave(mo, sb);
+		lock_dlm_leave(mo, sb, mnterr);
 }
 
 int main(int argc, char **argv)
@@ -167,7 +167,7 @@
 	rv = mount(mo.dev, mo.dir, fsname, mo.flags, mo.extra_plus);
 	if (rv) {
 		if (!(mo.flags & MS_REMOUNT))
-			umount_lockproto(proto, &mo, &sb);
+			umount_lockproto(proto, &mo, &sb, errno);
 
 		block_signals(SIG_UNBLOCK);
 
--- cluster/gfs2/mount/umount.gfs2.c	2006/06/22 20:58:28	1.9
+++ cluster/gfs2/mount/umount.gfs2.c	2006/07/20 20:19:04	1.10
@@ -83,7 +83,7 @@
 	int rv = 0;
 
 	if (!strcmp(proto, "lock_dlm"))
-		rv = lock_dlm_leave(mo, sb);
+		rv = lock_dlm_leave(mo, sb, 0);
 	return rv;
 }
 
--- cluster/gfs2/mount/util.c	2006/06/30 15:11:39	1.11
+++ cluster/gfs2/mount/util.c	2006/07/20 20:19:04	1.12
@@ -441,7 +441,7 @@
 	return rv;
 }
 
-int lock_dlm_leave(struct mount_options *mo, struct gen_sb *sb)
+int lock_dlm_leave(struct mount_options *mo, struct gen_sb *sb, int mnterr)
 {
 	int i, fd, rv;
 	char buf[MAXLINE];
@@ -462,11 +462,16 @@
 
 	/*
 	 * send request to gfs_controld for it to leave mountgroup:
-	 * "leave <mountpoint> gfs2"
+	 * "leave <mountpoint> <fstype> <mnterr>"
+	 *
+	 * mnterr is 0 if this leave is associated with an unmount.
+	 * mnterr is !0 if this leave is due to a failed kernel mount
+	 * in which case gfs_controld shouldn't wait for the kernel mount
+	 * to complete before doing the leave.
 	 */
 
 	memset(buf, 0, sizeof(buf));
-	rv = snprintf(buf, MAXLINE, "leave %s %s", mo->dir, fsname);
+	rv = snprintf(buf, MAXLINE, "leave %s %s %d", mo->dir, fsname, mnterr);
 	if (rv >= MAXLINE) {
 		warn("lock_dlm_leave: message too long: %d \"%s\"\n", rv, buf);
 		rv = -1;
--- cluster/gfs2/mount/util.h	2006/06/09 15:23:38	1.8
+++ cluster/gfs2/mount/util.h	2006/07/20 20:19:04	1.9
@@ -87,7 +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);
-int lock_dlm_leave(struct mount_options *mo, struct gen_sb *sb);
+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);
 
 /* mtab.c */



                 reply	other threads:[~2006-07-20 20:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060720201905.14805.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.