[Ocfs2-commits] mfasheh commits r2570 - branches/ocfs2-1.0/fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Sep 15 13:04:18 CDT 2005
Author: mfasheh
Signed-off-by: jlbec
Date: 2005-09-15 13:04:14 -0500 (Thu, 15 Sep 2005)
New Revision: 2570
Modified:
branches/ocfs2-1.0/fs/ocfs2/dlmglue.c
branches/ocfs2-1.0/fs/ocfs2/ocfs2.h
branches/ocfs2-1.0/fs/ocfs2/super.c
branches/ocfs2-1.0/fs/ocfs2/vote.c
Log:
* backport svn r2569 from trunk:
-Add intr / nointr mount options. Default to intr.
Signed-off-by: jlbec
Modified: branches/ocfs2-1.0/fs/ocfs2/dlmglue.c
===================================================================
--- branches/ocfs2-1.0/fs/ocfs2/dlmglue.c 2005-09-15 01:15:07 UTC (rev 2569)
+++ branches/ocfs2-1.0/fs/ocfs2/dlmglue.c 2005-09-15 18:04:14 UTC (rev 2570)
@@ -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();
@@ -1607,18 +1607,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;
@@ -1642,8 +1635,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: branches/ocfs2-1.0/fs/ocfs2/ocfs2.h
===================================================================
--- branches/ocfs2-1.0/fs/ocfs2/ocfs2.h 2005-09-15 01:15:07 UTC (rev 2569)
+++ branches/ocfs2-1.0/fs/ocfs2/ocfs2.h 2005-09-15 18:04:14 UTC (rev 2570)
@@ -172,6 +172,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: branches/ocfs2-1.0/fs/ocfs2/super.c
===================================================================
--- branches/ocfs2-1.0/fs/ocfs2/super.c 2005-09-15 01:15:07 UTC (rev 2569)
+++ branches/ocfs2-1.0/fs/ocfs2/super.c 2005-09-15 18:04:14 UTC (rev 2570)
@@ -144,6 +144,8 @@
#ifdef OCFS2_ORACORE_WORKAROUNDS
Opt_datavolume,
#endif
+ Opt_intr,
+ Opt_nointr,
Opt_err,
};
@@ -153,6 +155,8 @@
#ifdef OCFS2_ORACORE_WORKAROUNDS
{Opt_datavolume, "datavolume"},
#endif
+ {Opt_intr, "intr"},
+ {Opt_nointr, "nointr"},
{Opt_err, NULL}
};
@@ -499,6 +503,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: branches/ocfs2-1.0/fs/ocfs2/vote.c
===================================================================
--- branches/ocfs2-1.0/fs/ocfs2/vote.c 2005-09-15 01:15:07 UTC (rev 2569)
+++ branches/ocfs2-1.0/fs/ocfs2/vote.c 2005-09-15 18:04:14 UTC (rev 2570)
@@ -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);
@@ -981,7 +982,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