[Ocfs2-commits] khackel commits r1232 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Jul 2 01:53:47 CDT 2004
Author: khackel
Date: 2004-07-02 00:53:45 -0500 (Fri, 02 Jul 2004)
New Revision: 1232
Modified:
trunk/src/dlm.c
trunk/src/ocfs.h
Log:
this should take care of a couple of the disk voting problems hopefully. may need to do a little more than this tho
Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c 2004-07-02 01:13:39 UTC (rev 1231)
+++ trunk/src/dlm.c 2004-07-02 05:53:45 UTC (rev 1232)
@@ -1115,21 +1115,29 @@
LOG_TRACE_STR ("Network vote");
status = ocfs_send_dlm_request_msg (osb, lock_id, lock_type, flags,
&votemap, NULL, inode, &vote_status);
- if (status >= 0) {
- status = vote_status;
+ if (status >= 0 || status == -EAGAIN) {
+ if (status != -EAGAIN)
+ status = vote_status;
+
if (status >= 0) {
goto finally;
} else if (status == -EAGAIN) {
- LOG_TRACE_ARGS ("id=%llu\n", lock_id);
- ocfs_sleep (500);
+ LOG_TRACE_ARGS ("EAGAIN on net vote, id=%llu\n", lock_id);
continue;
} else {
LOG_ERROR_STATUS (status);
goto finito;
}
} else if (status == -ETIMEDOUT) {
- LOG_TRACE_STR ("Network voting timed out");
+ LOG_TRACE_ARGS ("ETIMEDOUT on net vote, id=%llu\n", lock_id);
+ status = -EAGAIN;
+ continue;
}
+ else if (status == -EINTR && ocfs_task_interruptible (osb)) {
+ LOG_ERROR_STR("interrupted!\n");
+ goto finito;
+ } else
+ LOG_ERROR_STATUS (status);
}
LOG_ERROR_ARGS("DISKVOTE!!: lock_type=%u, flags=%08x, blkno=%llu, inode=%llu\n",
@@ -1138,6 +1146,8 @@
osb->node_num, lockres->master_node_num, lockres->lock_type,
lockres->readonly_node);
+ //BUG();
+
ocfs_show_trace(NULL);
LOG_TRACE_STR ("Disk vote");
@@ -1375,6 +1385,7 @@
/* net voting */
+try_net_again:
if (comm_voting && !*disk_vote) {
LOG_TRACE_STR ("Network vote");
status = ocfs_send_dlm_request_msg (osb, lock_id, lock_type, flags,
@@ -1385,20 +1396,30 @@
goto vote_success;
else
goto bail;
- } else if (status == -ETIMEDOUT) {
+ } else if (status == -EAGAIN) {
+ LOG_TRACE_ARGS("(b) try again on net...\n");
+ goto try_net_again;
+ } else if (status == -ETIMEDOUT) {
LOG_TRACE_STR ("Network voting timed out");
+ LOG_TRACE_ARGS ("(c) try again on net... Network voting timed out\n");
+ goto try_net_again;
}
- else
+ else if (status == -EINTR && ocfs_task_interruptible (osb)) {
+ LOG_ERROR_STR("interrupted!\n");
+ goto bail;
+ } else
LOG_ERROR_STATUS (status);
}
-
+
LOG_ERROR_ARGS("DISKVOTE!!: req_lock=%u, flags=%08x, blkno=%llu, inode=%llu\n",
requested_lock, flags, lock_id, inode?OCFS_I(inode)->ip_blkno:0ULL);
LOG_ERROR_ARGS("DISKVOTE!!: this=%d, master=%d, locktype=%d, ronode=%d\n",
osb->node_num, lockres->master_node_num, lockres->lock_type,
lockres->readonly_node);
+ //BUG();
+
ocfs_show_trace(NULL);
/* disk voting */
Modified: trunk/src/ocfs.h
===================================================================
--- trunk/src/ocfs.h 2004-07-02 01:13:39 UTC (rev 1231)
+++ trunk/src/ocfs.h 2004-07-02 05:53:45 UTC (rev 1232)
@@ -112,9 +112,9 @@
#define OCFS_SET_INODE_TIME(i, x, y) (ocfs_get_seconds(i->x) = (y))
-#define MISS_COUNT_WARNING 30
-#define MISS_COUNT_EMERGENCY 200
-#define MISS_COUNT_NODE_DEAD 300
+#define MISS_COUNT_WARNING 20
+#define MISS_COUNT_EMERGENCY 40
+#define MISS_COUNT_NODE_DEAD 60
/*
** The following flag values reflect the operation to be performed
More information about the Ocfs2-commits
mailing list