[Ocfs2-commits] mfasheh commits r2569 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Sep 14 20:15:11 CDT 2005


Author: mfasheh
Signed-off-by: jlbec
Date: 2005-09-14 20:15:07 -0500 (Wed, 14 Sep 2005)
New Revision: 2569

Modified:
   trunk/fs/ocfs2/dlmglue.c
   trunk/fs/ocfs2/ocfs2.h
   trunk/fs/ocfs2/super.c
   trunk/fs/ocfs2/vote.c
Log:
* Add intr / nointr mount options. Default to intr.

Signed-off-by: jlbec



Modified: trunk/fs/ocfs2/dlmglue.c
===================================================================
--- trunk/fs/ocfs2/dlmglue.c	2005-09-15 01:11:11 UTC (rev 2568)
+++ trunk/fs/ocfs2/dlmglue.c	2005-09-15 01:15:07 UTC (rev 2569)
@@ -938,7 +938,7 @@
 	struct ocfs2_status_completion sc;
 	enum dlm_status status;
 	int ret;
-	int catch_signals = 1;
+	int catch_signals = !(osb->s_mount_opt & OCFS2_MOUNT_NOINTR);
 	int sync = 1;
 
 	mlog_entry_void();
@@ -1609,18 +1609,11 @@
 	     OCFS2_I(inode)->ip_blkno,
 	     ex ? "EXMODE" : "PRMODE");
 
-	status = 0;
-	acquired = 0;
-
 	if (!(flags & OCFS2_META_LOCK_RECOVERY))
-		status = wait_event_interruptible(osb->recovery_event,
-						  ocfs2_node_map_is_empty(osb,
-									  &osb->recovery_map));
-	if (status < 0) {
-		mlog_errno(status);
-		return status;
-	}
+		wait_event(osb->recovery_event,
+			   ocfs2_node_map_is_empty(osb, &osb->recovery_map));
 
+	acquired = 0;
 	lockres = &OCFS2_I(inode)->ip_meta_lockres;
 	level = ex ? LKM_EXMODE : LKM_PRMODE;
 	dlm_flags = 0;
@@ -1644,8 +1637,7 @@
 	 * abort the operation. */
 	if (!(flags & OCFS2_META_LOCK_RECOVERY))
 		wait_event(osb->recovery_event,
-			   ocfs2_node_map_is_empty(osb,
-						   &osb->recovery_map));
+			   ocfs2_node_map_is_empty(osb, &osb->recovery_map));
 
 	/* This is fun. The caller may want a bh back, or it may
 	 * not. ocfs2_meta_lock_update definitely wants one in, but

Modified: trunk/fs/ocfs2/ocfs2.h
===================================================================
--- trunk/fs/ocfs2/ocfs2.h	2005-09-15 01:11:11 UTC (rev 2568)
+++ trunk/fs/ocfs2/ocfs2.h	2005-09-15 01:15:07 UTC (rev 2569)
@@ -173,6 +173,7 @@
 {
 	OCFS2_MOUNT_HB_OK   = 1 << 0,	/* Heartbeat started */
 	OCFS2_MOUNT_BARRIER = 1 << 1,	/* Use block barriers */
+	OCFS2_MOUNT_NOINTR  = 1 << 2,   /* Don't catch signals */
 #ifdef OCFS2_ORACORE_WORKAROUNDS
 	OCFS2_MOUNT_COMPAT_OCFS = 1 << 30, /* ocfs1 compatibility mode */
 #endif

Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c	2005-09-15 01:11:11 UTC (rev 2568)
+++ trunk/fs/ocfs2/super.c	2005-09-15 01:15:07 UTC (rev 2569)
@@ -142,6 +142,8 @@
 #ifdef OCFS2_ORACORE_WORKAROUNDS
 	Opt_datavolume,
 #endif
+	Opt_intr,
+	Opt_nointr,
 	Opt_err,
 };
 
@@ -151,6 +153,8 @@
 #ifdef OCFS2_ORACORE_WORKAROUNDS
 	{Opt_datavolume, "datavolume"},
 #endif
+	{Opt_intr, "intr"},
+	{Opt_nointr, "nointr"},
 	{Opt_err, NULL}
 };
 
@@ -497,6 +501,12 @@
 			else
 				*mount_opt &= ~OCFS2_MOUNT_BARRIER;
 			break;
+		case Opt_intr:
+			*mount_opt &= ~OCFS2_MOUNT_NOINTR;
+			break;
+		case Opt_nointr:
+			*mount_opt |= OCFS2_MOUNT_NOINTR;
+			break;
 #ifdef OCFS2_ORACORE_WORKAROUNDS
 		case Opt_datavolume:
 			*mount_opt |= OCFS2_MOUNT_COMPAT_OCFS;

Modified: trunk/fs/ocfs2/vote.c
===================================================================
--- trunk/fs/ocfs2/vote.c	2005-09-15 01:11:11 UTC (rev 2568)
+++ trunk/fs/ocfs2/vote.c	2005-09-15 01:15:07 UTC (rev 2569)
@@ -817,7 +817,8 @@
 
 	status = -EAGAIN;
 	while (status == -EAGAIN) {
-		if (signal_pending(current))
+		if (!(osb->s_mount_opt & OCFS2_MOUNT_NOINTR) &&
+		    signal_pending(current))
 			return -ERESTARTSYS;
 
 		status = ocfs2_super_lock(osb, 0);
@@ -982,7 +983,8 @@
 
 	status = -EAGAIN;
 	while (status == -EAGAIN) {
-		if (signal_pending(current)) {
+		if (!(osb->s_mount_opt & OCFS2_MOUNT_NOINTR) &&
+		    signal_pending(current)) {
 			status = -ERESTARTSYS;
 			goto bail;
 		}



More information about the Ocfs2-commits mailing list