cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/gfs_controld lock_dlm.h recover.c
Date: 4 Sep 2007 19:27:35 -0000	[thread overview]
Message-ID: <20070904192735.19776.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL5
Changes by:	teigland at sourceware.org	2007-09-04 19:27:34

Modified files:
	group/gfs_controld: lock_dlm.h recover.c 

Log message:
	Reject mount attempts on an fs that's still in the process of unmounting.
	This regressed 8 months ago due to the bz 218560 changes.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/lock_dlm.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.7&r2=1.21.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.23.2.9&r2=1.23.2.10

--- cluster/group/gfs_controld/lock_dlm.h	2007/06/12 20:05:12	1.21.2.7
+++ cluster/group/gfs_controld/lock_dlm.h	2007/09/04 19:27:34	1.21.2.8
@@ -164,6 +164,7 @@
 	int			low_nodeid;
 	int			master_nodeid;
 	int			save_plocks;
+	int			reject_mounts;
 
 	uint64_t		cp_handle;
 	time_t			last_checkpoint_time;
--- cluster/group/gfs_controld/recover.c	2007/07/19 20:23:16	1.23.2.9
+++ cluster/group/gfs_controld/recover.c	2007/09/04 19:27:34	1.23.2.10
@@ -1617,7 +1617,13 @@
 
 	mg = find_mg(name);
 	if (mg) {
-		rv = add_another_mountpoint(mg, dir, dev, ci);
+		if (mg->reject_mounts) {
+			/* fs is being unmounted */
+			rv = -ESTALE;
+			log_error("mount: reject mount due to unmount");
+		} else {
+			rv = add_another_mountpoint(mg, dir, dev, ci);
+		}
 		goto out;
 	}
 
@@ -2030,6 +2036,7 @@
 	}
 
  out:
+	mg->reject_mounts = 1;
 	group_leave(gh, mg->name);
 	return 0;
 }



             reply	other threads:[~2007-09-04 19:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-04 19:27 teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-09-04 19:22 [Cluster-devel] cluster/group/gfs_controld lock_dlm.h recover.c teigland
2006-12-19 17:07 teigland
2006-12-19 17:07 teigland
2006-12-19 17:06 teigland
2006-12-19  1:48 rpeterso
2006-12-19  1:46 rpeterso
2006-12-19  1:42 rpeterso
2006-10-23 15:44 teigland
2006-10-16 14:44 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=20070904192735.19776.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 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).