[Ocfs2-commits] mfasheh commits r825 - in trunk/src: . inc
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Mar 30 13:46:30 CST 2004
Author: mfasheh
Date: 2004-03-30 13:46:28 -0600 (Tue, 30 Mar 2004)
New Revision: 825
Modified:
trunk/src/inc/ocfs.h
trunk/src/nm.c
Log:
* Fix the heartbeat timing to be consistent between 2.6 and 2.4 kernels.
* Fix the OCFS_VOLCFG_LOCK_ITERATE timing in the same way.
Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h 2004-03-30 19:11:59 UTC (rev 824)
+++ trunk/src/inc/ocfs.h 2004-03-30 19:46:28 UTC (rev 825)
@@ -572,7 +572,7 @@
#define OCFS_LINUX_MAX_FILE_SIZE 9223372036854775807LL
#define INITIAL_EXTENT_MAP_SIZE 10
-#define OCFS_VOLCFG_LOCK_ITERATE 10 /* in jiffies */
+#define OCFS_VOLCFG_LOCK_ITERATE (HZ/10) /* in jiffies */
#define OCFS_VOLCFG_LOCK_TIME 1000 /* in ms */
#define OCFS_VOLCFG_HDR_SECTORS 2 /* in sectors */
#define OCFS_VOLCFG_NEWCFG_SECTORS 4 /* in sectors */
Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c 2004-03-30 19:11:59 UTC (rev 824)
+++ trunk/src/nm.c 2004-03-30 19:46:28 UTC (rev 825)
@@ -228,6 +228,8 @@
//#define OCFS_BH_SEM_PRUNE_LIMIT 60 // prune everything each 30 seconds
#define OCFS_BH_SEM_PRUNE_LIMIT 60000 // 8 hours :)
+/* half a second timeout */
+#define OCFS_HEARTBEAT_JIFFIES (HZ >> 1)
/*
* ocfs_volume_thread()
@@ -428,7 +430,7 @@
goto finally;
}
}
- osb->hbt = 50 + jiffies;
+ osb->hbt = OCFS_HEARTBEAT_JIFFIES + jiffies;
finally:
status = 0;
@@ -438,7 +440,7 @@
break;
j = jiffies;
if (time_after (j, (unsigned long) (osb->hbt))) {
- osb->hbt = 50 + j;
+ osb->hbt = OCFS_HEARTBEAT_JIFFIES + j;
}
set_current_state (TASK_INTERRUPTIBLE);
schedule_timeout (osb->hbt - j);
More information about the Ocfs2-commits
mailing list