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

[Cluster-devel] cluster/group/gfs_controld lock_dlm.h recover.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2007-09-04 19:22:52

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&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/recover.c.diff?cvsroot=cluster&r1=1.32&r2=1.33

--- cluster/group/gfs_controld/lock_dlm.h	2007/06/12 20:04:41	1.28
+++ cluster/group/gfs_controld/lock_dlm.h	2007/09/04 19:22:52	1.29
@@ -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/11 17:01:23	1.32
+++ cluster/group/gfs_controld/recover.c	2007/09/04 19:22:52	1.33
@@ -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;
 }


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