[Ocfs-commits] manish commits r6 - in trunk: . ocfs2 ocfs2/Common ocfs2/Common/inc ocfs2/Linux ocfs2/Linux/inc vendor/unitedlinux

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu May 13 20:01:37 CDT 2004


Author: manish
Date: 2004-05-13 19:01:35 -0500 (Thu, 13 May 2004)
New Revision: 6

Added:
   trunk/vendor/unitedlinux/ocfs-2.4.21.spec-generic.in
Removed:
   trunk/vendor/unitedlinux/ocfs-2.4.21-107.spec.in
   trunk/vendor/unitedlinux/ocfs-2.4.21-111.spec.in
   trunk/vendor/unitedlinux/ocfs-2.4.21-138.spec.in
Modified:
   trunk/Makefile
   trunk/configure.in
   trunk/ocfs2/Common/inc/ocfs.h
   trunk/ocfs2/Common/inc/ocfsbool.h
   trunk/ocfs2/Common/inc/ocfscom.h
   trunk/ocfs2/Common/inc/ocfsconst.h
   trunk/ocfs2/Common/inc/ocfsdef.h
   trunk/ocfs2/Common/inc/ocfsdisk.h
   trunk/ocfs2/Common/inc/ocfsgenalloc.h
   trunk/ocfs2/Common/inc/ocfsgencreate.h
   trunk/ocfs2/Common/inc/ocfsgendirnode.h
   trunk/ocfs2/Common/inc/ocfsgendlm.h
   trunk/ocfs2/Common/inc/ocfsgenmisc.h
   trunk/ocfs2/Common/inc/ocfsgennm.h
   trunk/ocfs2/Common/inc/ocfsgensysfile.h
   trunk/ocfs2/Common/inc/ocfsgentrans.h
   trunk/ocfs2/Common/inc/ocfsgenutil.h
   trunk/ocfs2/Common/inc/ocfsgenvolcfg.h
   trunk/ocfs2/Common/inc/ocfsgenvote.h
   trunk/ocfs2/Common/inc/ocfsheartbeat.h
   trunk/ocfs2/Common/inc/ocfstrans.h
   trunk/ocfs2/Common/inc/ocfsver.h
   trunk/ocfs2/Common/inc/ocfsvol.h
   trunk/ocfs2/Common/ocfsgenalloc.c
   trunk/ocfs2/Common/ocfsgencreate.c
   trunk/ocfs2/Common/ocfsgendirnode.c
   trunk/ocfs2/Common/ocfsgendlm.c
   trunk/ocfs2/Common/ocfsgenmisc.c
   trunk/ocfs2/Common/ocfsgennm.c
   trunk/ocfs2/Common/ocfsgentrans.c
   trunk/ocfs2/Common/ocfsgenutil.c
   trunk/ocfs2/Common/ocfsgenvolcfg.c
   trunk/ocfs2/Common/ocfsgenvote.c
   trunk/ocfs2/Common/ocfsheartbeat.c
   trunk/ocfs2/Linux/inc/ocfsbitmap.h
   trunk/ocfs2/Linux/inc/ocfsdlmp.h
   trunk/ocfs2/Linux/inc/ocfsfile.h
   trunk/ocfs2/Linux/inc/ocfshash.h
   trunk/ocfs2/Linux/inc/ocfsioctl.h
   trunk/ocfs2/Linux/inc/ocfsmain.h
   trunk/ocfs2/Linux/inc/ocfsmount.h
   trunk/ocfs2/Linux/inc/ocfsport.h
   trunk/ocfs2/Linux/ocfsbitmap.c
   trunk/ocfs2/Linux/ocfsdlm.c
   trunk/ocfs2/Linux/ocfsfile.c
   trunk/ocfs2/Linux/ocfshash.c
   trunk/ocfs2/Linux/ocfsioctl.c
   trunk/ocfs2/Linux/ocfsipc.c
   trunk/ocfs2/Linux/ocfsmain.c
   trunk/ocfs2/Linux/ocfsmount.c
   trunk/ocfs2/Linux/ocfsport.c
   trunk/ocfs2/Linux/ocfsproc.c
   trunk/ocfs2/Makefile
   trunk/vendor/unitedlinux/Makefile
Log:
Sync


Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/Makefile	2004-05-14 00:01:35 UTC (rev 6)
@@ -78,7 +78,14 @@
 ul4gb_rpm: ul4gb_srpm
 	rpm --rebuild --target i586 "ocfs-2.4.19-4GB-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
 
-ul10sp3_%_srpm: dist
+
+$(TOPDIR)/vendor/unitedlinux/ocfs-2.4.21-%.spec: $(TOPDIR)/vendor/unitedlinux/ocfs-2.4.21.spec-generic
+	SPECVER="$@"; \
+		SPECVER="$${SPECVER#*ocfs-2.4.21-}"; \
+		SPECVER="$${SPECVER%.spec}"; \
+		sed -e 's/^%define sver.*%{generic}$$/%define sver		'$${SPECVER}'/' < $< > $@
+
+ul10sp3_%_srpm: dist $(TOPDIR)/vendor/unitedlinux/ocfs-2.4.21-%.spec
 	rpm -bs --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" $(TOPDIR)/vendor/unitedlinux/ocfs-2.4.21-$(patsubst ul10sp3_%_srpm,%,$@).spec
 
 ul10sp3_%_rpm: ul10sp3_%_srpm

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/configure.in	2004-05-14 00:01:35 UTC (rev 6)
@@ -8,14 +8,14 @@
 # Adjust these for the software version.
 MAJOR_VERSION=1
 MINOR_VERSION=0
-MICRO_VERSION=10
-EXTRA_VERSION=BETA
+MICRO_VERSION=12
+EXTRA_VERSION=PROD1
 
 # Adjust this only to bump the RPM packaging version
-RPM_VERSION=3
+RPM_VERSION=1
 
 # Required version of ocfs-tools
-SUPPORT_REQUIRED_VERSION=1.1.0
+SUPPORT_REQUIRED_VERSION=1.0.10
 
 DIST_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
 VERSION=$DIST_VERSION-$EXTRA_VERSION
@@ -299,7 +299,5 @@
 vendor/unitedlinux/ocfs-2.4.19-64GB-SMP.spec
 vendor/unitedlinux/ocfs-2.4.19-4GB-SMP.spec
 vendor/unitedlinux/ocfs-2.4.19-4GB.spec
-vendor/unitedlinux/ocfs-2.4.21-107.spec
-vendor/unitedlinux/ocfs-2.4.21-111.spec
-vendor/unitedlinux/ocfs-2.4.21-138.spec
+vendor/unitedlinux/ocfs-2.4.21.spec-generic
 ])

Modified: trunk/ocfs2/Common/inc/ocfs.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfs.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfs.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsbool.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsbool.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsbool.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -16,7 +16,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfscom.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfscom.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfscom.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsconst.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsconst.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsconst.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -35,7 +35,8 @@
 #define  ONE_MILLI_SEC           (10 * 1000)         /* 100 nanosec unit */
 #define  ONE_MEGA_BYTE           (1 * 1024 * 1024)   /* in bytes */
 
-#define  MISS_COUNT_VALUE        20
+#define  MISS_COUNT_VALUE        40
+#define  MIN_MISS_COUNT_VALUE    5
 
 #define  OCFS_DEFAULT_DIR_NODE_SIZE  (1024 * 128)
 #define  OCFS_DEFAULT_FILE_NODE_SIZE (512)
@@ -242,6 +243,7 @@
 
 #define OCFS_NM_HEARTBEAT_TIME		500	/* in ms */
 #define OCFS_HEARTBEAT_INIT             10      /* number of NM iterations to stabilize the publish map */
+#define OCFS_HB_TIMEOUT			30000	/* in ms */
 
 #ifndef O_DIRECT
 #define O_DIRECT        040000

Modified: trunk/ocfs2/Common/inc/ocfsdef.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsdef.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsdef.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -52,6 +52,9 @@
 
 #define  IS_VALID_OSB(_osb)	((_osb)->obj_id.type == OCFS_TYPE_OSB)
 
+#define  IS_VALID_DISKHB(_hb)	((_hb) >= 500 && (_hb) <= 5000)
+#define  IS_VALID_HBTIMEO(_to)	((_to) >= 10000 && (_to) <= 60000)
+
 #define  OCFS_GET_EXTENT(vbo, extent, k)                            \
               do {                                                  \
                 for ((k) = 0; (k) < OCFS_MAX_DATA_EXTENTS; (k)++) { \
@@ -335,6 +338,7 @@
 	__u32 num_cfg_nodes;
 	__u32 node_num;
 	bool reclaim_id;                /* reclaim the original node number*/
+	__u32 max_miss_cnt;
 	__u8 hbm;
 	unsigned long hbt;
 	__u64 log_disk_off;
@@ -475,7 +479,6 @@
 	__u32 dlm_msg_size;
 	__u16 version;
 	bool init;
-	bool re_init;
 	struct socket *send_sock;
 	struct socket *recv_sock;
 	struct completion complete;

Modified: trunk/ocfs2/Common/inc/ocfsdisk.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsdisk.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsdisk.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -200,6 +200,8 @@
 	__u32 prot_bits;
 	__u32 uid;
 	__u32 gid;
+	__u32 disk_hb;
+	__u32 hb_timeo;
 }
 ocfs_vol_layout;
 

Modified: trunk/ocfs2/Common/inc/ocfsgenalloc.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgenalloc.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgenalloc.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsgencreate.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgencreate.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgencreate.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -64,7 +64,7 @@
 		    __u64 file_size, __u64 * file_off, struct iattr *attr);
 
 int ocfs_get_dirnode(ocfs_super *osb, ocfs_dir_node *lockn, __u64 lockn_off,
-		     ocfs_dir_node *dirn);
+		     ocfs_dir_node *dirn, bool *invalid_dirnode);
 
 int ocfs_create_directory (ocfs_super * osb, __u64 parent_off, ocfs_file_entry * fe);
 

Modified: trunk/ocfs2/Common/inc/ocfsgendirnode.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgendirnode.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgendirnode.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -77,9 +77,36 @@
 int ocfs_del_file_entry (ocfs_super * osb,
 	      ocfs_file_entry * EntryToDel, ocfs_dir_node * LockNode);
 
-int ocfs_insert_file (ocfs_super * osb,
-	    ocfs_dir_node * DirNode,
-	    ocfs_file_entry * InsertEntry,
-	    ocfs_dir_node * LockNode, ocfs_lock_res * LockResource);
+int ocfs_insert_file (ocfs_super * osb, ocfs_dir_node * DirNode,
+		      ocfs_file_entry * InsertEntry, ocfs_dir_node * LockNode,
+		      ocfs_lock_res * LockResource, bool invalid_dirnode);
 
+int ocfs_validate_dir_index (ocfs_super *osb, ocfs_dir_node *dirnode);
+
+int ocfs_validate_num_del (ocfs_super *osb, ocfs_dir_node *dirnode);
+
+static inline int ocfs_validate_dirnode (ocfs_super *osb, ocfs_dir_node *dirn)
+{
+	int ret = 0;
+
+	if (!IS_VALID_DIR_NODE (dirn))
+		ret = -EFAIL;
+
+	if (ret == 0)
+		ret = ocfs_validate_dir_index (osb, dirn);
+	if (ret == 0)
+		ret = ocfs_validate_num_del (osb, dirn);
+
+	return ret;
+}
+
+static inline void ocfs_update_hden (ocfs_dir_node *lockn, ocfs_dir_node *dirn,
+				     __u64 off)
+{
+	if (lockn->node_disk_off != dirn->node_disk_off)
+		lockn->head_del_ent_node = off;
+	else
+		dirn->head_del_ent_node = off;
+}
+
 #endif				/* _OCFSGENDIRNODE_H_ */

Modified: trunk/ocfs2/Common/inc/ocfsgendlm.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgendlm.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgendlm.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsgenmisc.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgenmisc.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgenmisc.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -39,7 +39,7 @@
 
 void ocfs_delete_all_extent_maps (ocfs_inode * oin);
 
-void ocfs_release_oin (ocfs_inode * oin, bool FreeMemory);
+void ocfs_release_oin (ocfs_inode * oin, bool need_lock);
 
 int ocfs_initialize_osb (ocfs_super * osb,
 		   ocfs_vol_disk_hdr * VolDiskHdr,

Modified: trunk/ocfs2/Common/inc/ocfsgennm.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgennm.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgennm.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -27,6 +27,16 @@
 #ifndef _OCFSGENNM_H_
 #define _OCFSGENNM_H_
 
+static inline int ocfs_validate_lockid (ocfs_super *osb, __u64 lockid) {
+	if (!lockid)
+		return -1;
+	if (osb->vol_layout.size < lockid)
+		return -1;
+	if (lockid % OCFS_SECTOR_SIZE)
+		return -1;
+	return 0;
+}
+
 int ocfs_flush_data (ocfs_inode * oin);
 
 int ocfs_disk_update_resource (ocfs_super * osb, ocfs_lock_res * lockres,

Modified: trunk/ocfs2/Common/inc/ocfsgensysfile.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgensysfile.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgensysfile.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsgentrans.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgentrans.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgentrans.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsgenutil.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgenutil.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgenutil.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsgenvolcfg.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgenvolcfg.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgenvolcfg.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsgenvote.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsgenvote.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsgenvote.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsheartbeat.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsheartbeat.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsheartbeat.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -27,10 +27,23 @@
 #ifndef _OCFSHEARTBEAT_H_
 #define _OCFSHEARTBEAT_H_
 
+typedef struct _ocfs_sched_vote
+{
+	ocfs_super * osb;
+	__u32 node_num;
+	struct tq_struct sv_tq;
+	__u8 publish_sect[OCFS_SECTOR_SIZE];
+}
+ocfs_sched_vote;
+
 void ocfs_update_publish_map (ocfs_super * osb, void *buffer, bool first_time);
 
 int ocfs_nm_thread (ocfs_super * mount_osb);
 
 int ocfs_nm_heart_beat (ocfs_super * osb, __u32 flag, bool read_publish);
 
+int ocfs_schedule_vote (ocfs_super * osb, ocfs_publish * publish, __u32 node_num);
+
+void ocfs_process_vote_worker (void * val);
+
 #endif				/* _OCFSHEARTBEAT_H_ */

Modified: trunk/ocfs2/Common/inc/ocfstrans.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfstrans.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfstrans.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsver.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsver.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsver.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/inc/ocfsvol.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsvol.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/inc/ocfsvol.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -32,6 +32,11 @@
 #define  OCFS_MINOR_VER_STRING           "2"
 #define  OCFS_MAJOR_VER_STRING           "1"
 
+#define  OCFS2_MINOR_VERSION             (0)
+#define  OCFS2_MAJOR_VERSION             (2)
+#define  OCFS2_MINOR_VER_STRING          "0"
+#define  OCFS2_MAJOR_VER_STRING          "2"
+
 #define  OCFS_VOLUME_SIGNATURE           "OracleCFS"
 #define  MAX_VOL_SIGNATURE_LEN		128
 #define  MAX_MOUNT_POINT_LEN		128
@@ -79,6 +84,10 @@
 	__u32 uid;				// UID
 	__u32 gid;				// GID
 	__s32 excl_mount;			// NODENUM
+	/* disk heartbeat time in ms */
+	__u32 disk_hb;				// NUMBER RANGE(0, ULONG_MAX)
+	/* node timeout in ms */
+	__u32 hb_timeo;				// NUMBER RANGE(0, ULONG_MAX)
 }
 ocfs_vol_disk_hdr;				// END CLASS
 

Modified: trunk/ocfs2/Common/ocfsgenalloc.c
===================================================================
--- trunk/ocfs2/Common/ocfsgenalloc.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgenalloc.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -2057,7 +2057,7 @@
 	/* special case: just one byte - also happens to be the *only* 
 	 * way in which this func is currently called */
 	if (ByteCount == 1) {
-		status = -EFAIL;
+		status = -ESPIPE;
 		/* return the blocknum directly, no need to alloc ioruns */
 		if (ocfs_lookup_extent_map_entry (osb, &oin->map, Vbo, Lbo, 
 						  &length, &Runs)) {
@@ -2099,10 +2099,11 @@
 	}
 
 	if (Vbo >= (__s64) FileEntry->alloc_size) {
-		LOG_ERROR_ARGS ("fe=%u.%u, vbo=%u.%u, fe->alloc_sz=%u.%u, oin->alloc_size=%u.%u",
+		LOG_TRACE_ARGS ("fe=%u.%u, vbo=%u.%u, fe->alloc_sz=%u.%u, "
+			       	"oin->alloc_size=%u.%u\n",
 			       	HILO (FileEntry->this_sector), HILO (Vbo),
 			       	HILO (FileEntry->alloc_size), HILO (oin->alloc_size));
-		status = -EFAIL;
+		status = -ESPIPE;
 		goto finally;
 	}
 
@@ -2149,7 +2150,7 @@
 						"oin->alloc_size=%u.%u, thisext=%u.%u",
 						HILO(localVbo), HILO(oin->alloc_size),
 						HILO(OcfsExtent->this_ext));
-					status = -EFAIL;
+					status = -ESPIPE;
 					goto finally;
 				}
 
@@ -2167,7 +2168,7 @@
 	}
 
 	if (ByteCount == 1) {
-		status = -EFAIL;
+		status = -ESPIPE;
 		if (ocfs_lookup_extent_map_entry (osb, &oin->map, Vbo, Lbo, 
 						  &length, &Runs)) {
 			status = 0;
@@ -2189,7 +2190,7 @@
 		*(Lbo) = IoRuns[0].disk_off;
 	}
 
-no_iorun_exit:	
+no_iorun_exit:
 	/* Should send a null for IoRuns in case of onl 1 extent */
 	LOG_TRACE_ARGS ("Num of Runs is: %d\n", Runs);
 

Modified: trunk/ocfs2/Common/ocfsgencreate.c
===================================================================
--- trunk/ocfs2/Common/ocfsgencreate.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgencreate.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -70,7 +70,7 @@
 		/* Add checks as needed */
 		if (IS_FE_DELETED(fe->sync_flags) ||
 		    (!(fe->sync_flags & OCFS_SYNC_FLAG_VALID))) {
-			LOG_TRACE_ARGS ("Invalid file: %*s, syncflg=0x%X",
+			LOG_TRACE_ARGS ("Invalid file: %*s, syncflg=0x%X\n",
 				       	fe->filename_len, fe->filename,
 				       	fe->sync_flags);
 			OCFS_SET_FLAG (oin->oin_flags, OCFS_OIN_INVALID);
@@ -82,7 +82,7 @@
                 disk_len = strlen(fe->filename);
 		inode = oin->inode;
 		if (inode == NULL) {
-			LOG_TRACE_ARGS ("oin has no matching inode: %*s",
+			LOG_TRACE_ARGS ("oin has no matching inode: %*s\n",
 				       	fe->filename_len, fe->filename);
 			OCFS_SET_FLAG (oin->oin_flags, OCFS_OIN_INVALID);
 			status = -ENOENT;
@@ -101,7 +101,7 @@
                         }
                 }
 		if (status < 0) {
-			LOG_TRACE_ARGS ("name did not match inode: %*s, %d",
+			LOG_TRACE_ARGS ("name did not match inode: %*s\n",
 				       	fe->filename_len, fe->filename);
 			OCFS_SET_FLAG (oin->oin_flags, OCFS_OIN_INVALID);
 			goto leave;
@@ -1010,7 +1010,7 @@
 	status = ocfs_acquire_lock (osb, lockId, OCFS_DLM_EXCLUSIVE_LOCK,
 			lockFlags, &pLockResource, (ocfs_file_entry *) pLockNode);
 	if (status < 0) {
-		if (status != -EINTR)
+		if (status != -EINTR && status != -EBUSY)
 			LOG_ERROR_STATUS (status);
 		goto leave;
 	}
@@ -1417,16 +1417,20 @@
  *
  */
 int ocfs_get_dirnode(ocfs_super *osb, ocfs_dir_node *lockn, __u64 lockn_off,
-		     ocfs_dir_node *dirn)
+		     ocfs_dir_node *dirn, bool *invalid_dirnode)
 {
 	int status = 0;
 	__u64 node_off;
+	bool hden = false;
 
 	LOG_ENTRY_ARGS ("(lockn_off=%u.%u)\n", HILO (lockn_off));
 
-	if (lockn->head_del_ent_node != INVALID_NODE_POINTER)
+	*invalid_dirnode = false;
+
+	if (lockn->head_del_ent_node != INVALID_NODE_POINTER) {
 		node_off = lockn->head_del_ent_node;
-	else {
+		hden = true;
+	} else {
     		if (lockn->free_node_ptr == INVALID_NODE_POINTER)
 			node_off = lockn_off;
 		else
@@ -1439,36 +1443,54 @@
 		goto leave;
 	}
 
-	if (dirn->node_disk_off != lockn->head_del_ent_node)
-		goto leave;
+	status = ocfs_validate_dirnode (osb, dirn);
+	if (status >= 0) {
+		if (dirn->node_disk_off != lockn->head_del_ent_node)
+			goto leave;
 
-	if (dirn->num_ent_used < osb->max_dir_node_ent)
+		if (dirn->num_ent_used < osb->max_dir_node_ent)
+			goto leave;
+	} else if (status != -EBADSLT) {
+		LOG_ERROR_STATUS (status);
 		goto leave;
+	} else {
+		*invalid_dirnode = true;
+		status = 0;
+	}
 
 	/* dirn with no free slots and pointed to by head_del_ent_node */
 	node_off = lockn_off;
 	while (1) {
+		*invalid_dirnode = false;
+
 		status = ocfs_read_dir_node (osb, dirn, node_off);
 		if (status < 0) {
 			LOG_ERROR_STATUS (status);
 			goto leave;
 		}
 
-		if (dirn->num_ent_used < osb->max_dir_node_ent) {
-			if (lockn->node_disk_off != dirn->node_disk_off)
-				lockn->head_del_ent_node = dirn->node_disk_off;
-			else
-				dirn->head_del_ent_node = dirn->node_disk_off;
+		status = ocfs_validate_dirnode (osb, dirn);
+		if (status >= 0) {
+			if (dirn->num_ent_used < osb->max_dir_node_ent) {
+				if (hden)
+					ocfs_update_hden (lockn, dirn,
+							  dirn->node_disk_off);
+				goto leave;
+			}
+		} else if (status != -EBADSLT) {
+			LOG_ERROR_STATUS (status);
 			goto leave;
+		} else {
+			*invalid_dirnode = true;
+			status = 0;
 		}
 
 		node_off = dirn->next_node_ptr;
 
 		if (node_off == INVALID_NODE_POINTER) {
-			if (lockn->node_disk_off != dirn->node_disk_off)
-				lockn->head_del_ent_node = INVALID_NODE_POINTER;
-			else
-				dirn->head_del_ent_node = INVALID_NODE_POINTER;
+			if (hden && !*invalid_dirnode)
+				ocfs_update_hden (lockn, dirn,
+						  INVALID_NODE_POINTER);
 			goto leave;
 		}
 	}
@@ -1497,6 +1519,7 @@
 	ocfs_lock_res *pLockResource = NULL;
 	__u32 lockFlags = 0;
 	bool bAcquiredLock = false;
+	bool invalid_dirnode = false;
 
 	LOG_ENTRY ();
 
@@ -1583,7 +1606,8 @@
 		}
 	}
 
-	status = ocfs_get_dirnode(osb, pLockNode, parent_off, PDirNode);
+	status = ocfs_get_dirnode(osb, pLockNode, parent_off, PDirNode,
+				  &invalid_dirnode);
 	if (status < 0) {
 		LOG_ERROR_STATUS (status);
 		goto leave;
@@ -1599,7 +1623,7 @@
 	DISK_LOCK_READER_NODE (fileEntry) = osb->node_num;
 
 	status = ocfs_insert_file (osb, PDirNode, fileEntry, pLockNode,
-				   pLockResource);
+				   pLockResource, invalid_dirnode);
 	if (status < 0) {
 		LOG_ERROR_STATUS (status);
 		goto leave;
@@ -1636,6 +1660,7 @@
 	ocfs_lock_res *pLockResource = NULL;
 	__u32 lockFlags = 0;
 	bool bAcquiredLock = false;
+	bool invalid_dirnode = false;
 
 	LOG_ENTRY_ARGS ("(osb=0x%p, poff=%u.%u, fe=0x%p)\n", osb,
 		       	HILO(parent_off), fe);
@@ -1672,7 +1697,8 @@
 		goto leave;
 	}
 
-	status = ocfs_get_dirnode(osb, pLockNode, parent_off, PDirNode);
+	status = ocfs_get_dirnode(osb, pLockNode, parent_off, PDirNode,
+				  &invalid_dirnode);
 	if (status < 0) {
 		LOG_ERROR_STATUS (status);
 		goto leave;
@@ -1684,8 +1710,10 @@
 	DISK_LOCK_WRITER_NODE (fileEntry) = osb->node_num;
 	DISK_LOCK_READER_NODE (fileEntry) = osb->node_num;
 
+	fileEntry->next_del = INVALID_DIR_NODE_INDEX;
+
 	status = ocfs_insert_file (osb, PDirNode, fileEntry, pLockNode,
-				   pLockResource);
+				   pLockResource, invalid_dirnode);
 	if (status < 0) {
 		LOG_ERROR_STATUS (status);
 		goto leave;
@@ -1748,7 +1776,8 @@
 	    case FLAG_FILE_DELETE:
 		    status = ocfs_del_file (osb, parent_off, 0, *file_off);
 		    if (status < 0) {
-			    if (status != -EINTR && status != -ENOTEMPTY)
+			    if (status != -EINTR && status != -ENOTEMPTY &&
+			       	status != -EBUSY)
 				    LOG_ERROR_STATUS (status);
 			    goto leave;
 		    }
@@ -2661,6 +2690,7 @@
 	__u32 lockFlags = 0;
 	bool bAcquiredLock = false;
 	__u8 *buffer = NULL;
+	bool invalid_dirnode = false;
 
 	LOG_ENTRY ();
 
@@ -2736,7 +2766,8 @@
 		goto leave;
 	}
 
-	status = ocfs_get_dirnode(osb, pLockNode, parent_off, PDirNode);
+	status = ocfs_get_dirnode(osb, pLockNode, parent_off, PDirNode,
+				  &invalid_dirnode);
 	if (status < 0) {
 		LOG_ERROR_STATUS (status);
 		goto leave;
@@ -2748,7 +2779,7 @@
 	DISK_LOCK_READER_NODE (fileEntry) = osb->node_num;
 
 	status = ocfs_insert_file (osb, PDirNode, fileEntry, pLockNode,
-				   pLockResource);
+				   pLockResource, invalid_dirnode);
 	if (status < 0) {
 		LOG_ERROR_STATUS(status);
 		goto leave;

Modified: trunk/ocfs2/Common/ocfsgendirnode.c
===================================================================
--- trunk/ocfs2/Common/ocfsgendirnode.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgendirnode.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -833,6 +833,7 @@
 			if (status < 0) {
 				LOG_ERROR_STATUS (status);
 			}
+#if 0
 			if (!bCacheWrite) {
 				status =
 				    ocfs_write_disk (osb, buffer, size, offset);
@@ -840,6 +841,7 @@
 					LOG_ERROR_STATUS (status);
 				}
 			}
+#endif
 		} else {
 			status = ocfs_write_disk (osb, buffer, size, offset);
 			if (status < 0) {
@@ -1376,6 +1378,7 @@
 	ocfs_lock_res *dir_lres = NULL;
 	__u64 dir_off;
 	bool lock_acq = false;
+	bool lock_rls = false;
 	int index = 0;
 	int length = 0;
 
@@ -1447,6 +1450,20 @@
 					PDirNode->head_del_ent_node = PDirNode->node_disk_off;
 			}
 
+			/* clear the lock on disk */
+			if (DISK_LOCK_FILE_LOCK (PDirNode) != OCFS_DLM_ENABLE_CACHE_LOCK) {
+				ocfs_acquire_lockres (dir_lres);
+				dir_lres->lock_type = OCFS_DLM_NO_LOCK;
+				ocfs_release_lockres (dir_lres);
+
+				lock_rls = true;
+
+				if (LockNode->node_disk_off == PDirNode->node_disk_off)
+					DISK_LOCK_FILE_LOCK (PDirNode) = OCFS_DLM_NO_LOCK;
+				else
+					DISK_LOCK_FILE_LOCK (LockNode) = OCFS_DLM_NO_LOCK;
+			}
+
 			status = ocfs_write_dir_node (osb, PDirNode, offset);
 			if (status < 0) {
 				LOG_ERROR_STATUS (status);
@@ -1475,6 +1492,8 @@
 					goto leave;
 				}
 			}
+			if (lock_rls)
+				lock_acq = false;
 			goto leave;
 		}
 	}
@@ -1487,6 +1506,7 @@
 			LOG_ERROR_STATUS (tmpstat);
 	}
 
+	ocfs_put_lockres (dir_lres);
 	ocfs_release_dirnode (PDirNode);
 	LOG_EXIT_STATUS (status);
 	return status;
@@ -1498,7 +1518,7 @@
  */
 int ocfs_insert_file (ocfs_super * osb, ocfs_dir_node * DirNode,
 		      ocfs_file_entry * InsertEntry, ocfs_dir_node * LockNode,
-		      ocfs_lock_res * LockResource)
+		      ocfs_lock_res * LockResource, bool invalid_dirnode)
 {
 	int status = 0;
 	__u64 bitmapOffset = 0;
@@ -1519,7 +1539,7 @@
 	/* and insert in that. */
 
 	/* We should not find this entry already inserted */
-	if (DirNode->num_ent_used < osb->max_dir_node_ent) {
+	if (!invalid_dirnode && DirNode->num_ent_used < osb->max_dir_node_ent) {
 		status = ocfs_insert_dir_node (osb, DirNode, InsertEntry, LockNode,
 					&indexOffset);
 		if (status < 0) {
@@ -1582,7 +1602,6 @@
 		/* Insert in this dirnode and setup the pointers */
 		DirNode->next_node_ptr = pNewDirNode->node_disk_off;
 
-		/* Create the btree now... */
 		status = ocfs_write_dir_node (osb, pNewDirNode, indexOffset);
 		if (status < 0) {
 			LOG_ERROR_STATUS (status);
@@ -1591,17 +1610,22 @@
 		indexOffset = -1;
 	}
 
-	if (DISK_LOCK_FILE_LOCK (DirNode) != OCFS_DLM_ENABLE_CACHE_LOCK) {
-		/* This is an optimization... */
-		ocfs_acquire_lockres (LockResource);
-		LockResource->lock_type = OCFS_DLM_NO_LOCK;
-		ocfs_release_lockres (LockResource);
-
-		if (LockNode->node_disk_off == DirNode->node_disk_off)
+	if (LockNode->node_disk_off == DirNode->node_disk_off) {
+		if (DISK_LOCK_FILE_LOCK (DirNode) != OCFS_DLM_ENABLE_CACHE_LOCK) {
+			ocfs_acquire_lockres (LockResource);
+			LockResource->lock_type = OCFS_DLM_NO_LOCK;
+			ocfs_release_lockres (LockResource);
 			/* Reset the lock on the disk */
 			DISK_LOCK_FILE_LOCK (DirNode) = OCFS_DLM_NO_LOCK;
-		else
+		}
+	} else {
+		if (DISK_LOCK_FILE_LOCK (LockNode) != OCFS_DLM_ENABLE_CACHE_LOCK) {
+			ocfs_acquire_lockres (LockResource);
+			LockResource->lock_type = OCFS_DLM_NO_LOCK;
+			ocfs_release_lockres (LockResource);
+			/* Reset the lock on the disk */
 			DISK_LOCK_FILE_LOCK (LockNode) = OCFS_DLM_NO_LOCK;
+		}
 	}
 
 	status = ocfs_write_dir_node (osb, DirNode, indexOffset);
@@ -1633,3 +1657,133 @@
 	LOG_EXIT_STATUS (status);
 	return status;
 }				/* ocfs_insert_file */
+
+
+/*
+ * ocfs_validate_dir_index()
+ *
+ */
+int ocfs_validate_dir_index (ocfs_super *osb, ocfs_dir_node *dirnode)
+{
+	ocfs_file_entry *fe = NULL;
+	int status = 0;
+	__u8 i;
+	__u8 offset;
+	__u8 *ind = NULL;
+
+	LOG_ENTRY_ARGS ("(osb=0x%p, dn=0x%p)\n", osb, dirnode);
+
+	if ((ind = (__u8 *)ocfs_malloc (256)) == NULL) {
+		LOG_ERROR_STATUS (status = -ENOMEM);
+		goto bail;
+	}
+
+	memset(ind, 0, 256);
+
+	for (i = 0; i < dirnode->num_ent_used; ++i) {
+		offset = dirnode->index[i];
+		if (offset > 253 || ind[offset]) {
+			status = -EBADSLT;
+			break;
+		} else
+			ind[offset] = 1;
+
+		fe = (ocfs_file_entry *) (FIRST_FILE_ENTRY (dirnode) +
+					  (offset * OCFS_SECTOR_SIZE));
+
+		if (!fe->sync_flags) {
+			status = -EBADSLT;
+			break;
+		}
+	}
+
+	if (status == -EBADSLT)
+		LOG_ERROR_ARGS ("corrupted index in dirnode=%u.%u",
+			       	HILO(dirnode->node_disk_off));
+
+bail:
+	ocfs_safefree (ind);
+	LOG_EXIT_STATUS (status);
+	return status;
+}				/* ocfs_validate_dir_index */
+
+
+/*
+ * ocfs_validate_num_del()
+ *
+ */
+int ocfs_validate_num_del (ocfs_super *osb, ocfs_dir_node *dirnode)
+{
+	ocfs_file_entry *fe = NULL;
+	int i;
+	int j;
+	int status = 0;
+	__u8 offset;
+	__u8 *ind = NULL;
+	char tmpstr[3];
+	__u64 tmpoff;
+
+	LOG_ENTRY_ARGS ("(osb=0x%p, dn=0x%p)\n", osb, dirnode);
+
+	if (!dirnode->num_del)
+		goto bail;
+
+	if ((ind = (__u8 *)ocfs_malloc (256)) == NULL) {
+		LOG_ERROR_STATUS (status = -ENOMEM);
+		goto bail;
+	}
+
+	memset(ind, 0, 256);
+
+	offset = dirnode->first_del;
+	for (i = 0; i < dirnode->num_del; ++i) {
+		if (offset > 253) {
+			status = -EBADSLT;
+			break;
+		}
+
+		/* check if offset is in index and hence invalid */
+		for (j = 0; j < dirnode->num_ent_used; ++j) {
+			if (dirnode->index[j] == offset) {
+				status = -EBADSLT;
+				break;
+			}
+		}
+
+		/* check for circular list */
+		if (ind[offset]) {
+			status = -EBADSLT;
+			break;
+		} else
+			ind[offset] = 1;
+
+		fe = (ocfs_file_entry *) (FIRST_FILE_ENTRY (dirnode) +
+					  (offset * OCFS_SECTOR_SIZE));
+
+		/* file has to be deleted to be in the list */
+		if (fe->sync_flags) {
+			status = -EBADSLT;
+			break;
+		}
+
+		offset = (__u8)fe->next_del;
+	}
+
+	if (status == -EBADSLT) {
+		if (i) {
+			strncpy (tmpstr, "fe", sizeof(tmpstr));
+			tmpoff = fe->this_sector;
+		} else {
+			strncpy (tmpstr, "dn", sizeof(tmpstr));
+			tmpoff = dirnode->node_disk_off;
+		}
+
+		LOG_ERROR_ARGS ("bad offset=%u in %s=%u.%u", offset, tmpstr,
+			       	tmpoff);
+	}
+
+bail:
+	ocfs_safefree (ind);
+	LOG_EXIT_STATUS (status);
+	return status;
+}				/* ocfs_validate_num_del */

Modified: trunk/ocfs2/Common/ocfsgendlm.c
===================================================================
--- trunk/ocfs2/Common/ocfsgendlm.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgendlm.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -31,7 +31,6 @@
 #include <libocfs.h>
 #endif
 
-
 #define WAIT_FOR_VOTE_INCREMENT  200
 
 /* Tracing */
@@ -158,6 +157,7 @@
 	__u8 *p;
 	__u32 wait;
 	bool publish_flag = false;
+	__u32 disk_hb = osb->vol_layout.disk_hb;
 
 	LOG_ENTRY_ARGS ("(osb=0x%p, id=%u.%u, ty=%u, fl=%u, vm=0x%08x)\n", osb,
 		 HI(lock_id), LO(lock_id), lock_type, flags, LO(vote_map));
@@ -195,7 +195,7 @@
 			} else {
 				get_random_bytes(&wait, sizeof(wait));
 				wait %= 200;
-				wait += OCFS_NM_HEARTBEAT_TIME;
+				wait += disk_hb;
 				LOG_TRACE_ARGS ("wait: %d\n", wait);
 				ocfs_sleep (wait);
 			}
@@ -564,21 +564,18 @@
 	__u64 gotvotemap = 0;
 	__u64 fileopenmap = 0;
 
-	LOG_ENTRY_ARGS ("(osb=0x%p, id=%u.%u, ty=%u, fl=%u, vm=0x%08x, "
-		"sq:%u.%u)\n", osb, HI (lock_id), LO (lock_id), lock_type,
-		flags, LO (vote_map), HI(lock_seq_num), LO(lock_seq_num));
+	LOG_ENTRY_ARGS ("(osb=0x%p, id=%u.%u, type=%u, flg=%u, map=0x%x, "
+		       	"seq=%u.%u)\n", osb, HILO (lock_id), lock_type,
+		       	flags, LO (vote_map), HILO (lock_seq_num));
 
 	while (time_to_wait > timewaited) {
 		ocfs_sleep (WAIT_FOR_VOTE_INCREMENT);
 
 		if (!atomic_read (&osb->node_req_vote)) {
-			LOG_TRACE_ARGS ("wait EAGAIN\n");
 			status = -EAGAIN;
 			goto bail;
 		}
 
-		gotvotemap |= (1 << osb->node_num);
-
 		status = ocfs_get_vote_on_disk (osb, lock_id, lock_type, flags,
 				&gotvotemap, vote_map, lock_seq_num, &fileopenmap);
 		if (status < 0) {
@@ -587,12 +584,6 @@
 			goto bail;
 		}
 
-		if (!(gotvotemap & (1 << osb->node_num))) {
-			status = -EAGAIN;
-			goto bail;
-		}
-
-		vote_map |= (1 << osb->node_num);
 		if (vote_map == gotvotemap) {
 			if ((flags & FLAG_FILE_EXTEND) || (flags & FLAG_FILE_UPDATE))
 				lockres->oin_openmap = fileopenmap;
@@ -608,10 +599,11 @@
 	ocfs_compute_dlm_stats ((timewaited >= time_to_wait ? -ETIMEDOUT : 0),
 			       	status, &(osb->dsk_reqst_stats));
 
-	LOG_TRACE_ARGS ("disk vote id=%u.%u, seq=%u.%u, map=0x%08x, "
-		       	"flags=0x%08x, type=0x%08x, status=%d\n",
+	LOG_TRACE_ARGS ("disk vote id=%u.%u, seq=%u.%u, map=0x%x, "
+		       	"flags=0x%x, type=0x%x, status=%d, timeo=%d\n",
 		       	HILO(lock_id), HILO(lock_seq_num), LO(vote_map),
-		       	flags, lock_type, status);
+		       	flags, lock_type, status,
+			(timewaited >= time_to_wait ? -ETIMEDOUT : 0));
 
 	LOG_EXIT_STATUS (status);
 	return status;
@@ -721,7 +713,7 @@
 
 	ocfs_send_bcast (osb, vote_map, dlm_msg);
 	status = ocfs_wait (lockres->voted_event,
-			    atomic_read (&lockres->voted_event_woken), 1000);
+			    atomic_read (&lockres->voted_event_woken), 3000);
 	atomic_set (&lockres->voted_event_woken, 0);
  
 	if (status == -ETIMEDOUT) {
@@ -997,6 +989,23 @@
 	return status;
 }				/* ocfs_update_disk_lock */
 
+
+#define ACQUIRE_WITH_FLAG(lock, flag)			\
+	do {						\
+		if (!(flag)) {				\
+			ocfs_acquire_lockres(lock);	\
+			(flag) = true;			\
+		}					\
+	} while (0)
+
+#define RELEASE_WITH_FLAG(lock, flag)			\
+	do {						\
+		if (flag) {				\
+			ocfs_release_lockres(lock);	\
+			(flag) = false;			\
+		}					\
+	} while (0)
+
 /*
  * ocfs_update_master_on_open()
  *
@@ -1005,25 +1014,26 @@
 {
 	int status = -EAGAIN;
 	bool disk_vote = false;
+	bool lock_acq = false;
 
 	LOG_ENTRY ();
 
+	ocfs_get_lockres(lockres);
+
 	while (status == -EAGAIN) {
 		if (!IS_NODE_ALIVE (osb->publ_map, lockres->master_node_num,
 				    OCFS_MAXIMUM_NODES)) {
 			LOG_TRACE_ARGS ("Master (%u) dead, lockid %u.%u\n",
-				lockres->master_node_num,
-				HI (lockres->sector_num), LO (lockres->sector_num));
+				lockres->master_node_num, HILO (lockres->sector_num));
 			status = 0;
 			goto bail;
 		}
 
-		ocfs_acquire_lockres (lockres);
+		ACQUIRE_WITH_FLAG(lockres, lock_acq);
 
 		if (lockres->master_node_num == osb->node_num) {
 			LOG_TRACE_ARGS ("Added node to map 0x%08x, lockid %u.%u\n",
-			     LO (lockres->oin_openmap), HI (lockres->sector_num),
-			     LO (lockres->sector_num));
+			     LO (lockres->oin_openmap), HILO (lockres->sector_num));
 
 			lockres->oin_openmap |= (1 << osb->node_num);
 			status = ocfs_update_disk_lock (osb, lockres,
@@ -1032,14 +1042,13 @@
 				LOG_ERROR_STATUS (status);
 				goto bail;
 			}
-			ocfs_release_lockres (lockres);
 		} else {
 			status = ocfs_update_lock_state (osb, lockres,
 						 FLAG_ADD_OIN_MAP, &disk_vote);
 			if (status < 0) {
 				if (status != -EAGAIN)
 					LOG_ERROR_STATUS (status);
-				ocfs_release_lockres (lockres);
+				RELEASE_WITH_FLAG(lockres, lock_acq);
 				if (status == -EAGAIN) {
 					ocfs_sleep (500);
 					if (ocfs_task_interruptible (osb)) {
@@ -1053,11 +1062,12 @@
 				}
 				goto bail;
 			}
-			ocfs_release_lockres (lockres);
 		}
 	}
 
       bail:
+	RELEASE_WITH_FLAG(lockres, lock_acq);
+	ocfs_put_lockres(lockres);
 	LOG_EXIT_STATUS (status);
 	return status;
 }				/* ocfs_update_master_on_open */
@@ -1274,7 +1284,8 @@
 			continue;
 		} else {
 			ocfs_release_lockres (lockres);
-			LOG_ERROR_STATUS (status);
+			if (status != -EBUSY)
+				LOG_ERROR_STATUS (status);
 			goto finally;
 		}
 	}
@@ -1284,22 +1295,7 @@
 	return status;
 }				/* ocfs_get_x_for_del */
 
-#define ACQUIRE_WITH_FLAG(lock, flag)			\
-	do {						\
-		if (!(flag)) {				\
-			ocfs_acquire_lockres(lock);	\
-			(flag) = true;			\
-		}					\
-	} while (0)
 
-#define RELEASE_WITH_FLAG(lock, flag)			\
-	do {						\
-		if (flag) {				\
-			ocfs_release_lockres(lock);	\
-			(flag) = false;			\
-		}					\
-	} while (0)
-
 /*
  * ocfs_try_exclusive_lock()
  *
@@ -1483,7 +1479,7 @@
 						     flags, lockres, fe);
                         RELEASE_WITH_FLAG(lockres, lockres_acq); 
 			if (status < 0) {
-				if (status != -EINTR)
+				if (status != -EINTR && status != -EBUSY)
 					LOG_ERROR_STATUS (status);
 			}
                         goto finally;
@@ -1635,7 +1631,7 @@
 						     updated, disklock, lock_id,
 						     lock_type);
 		    if (status < 0) {
-			if (status != -EINTR)
+			if (status != -EINTR && status != -EBUSY)
 				LOG_ERROR_STATUS (status);
 			goto finally;
 		    }
@@ -1929,7 +1925,6 @@
 	LOG_ENTRY ();
 
 	OcfsIpcCtxt.init = false;
-	OcfsIpcCtxt.re_init = false;
 
 	LOG_EXIT_STATUS (0);
 	return 0;

Modified: trunk/ocfs2/Common/ocfsgenmisc.c
===================================================================
--- trunk/ocfs2/Common/ocfsgenmisc.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgenmisc.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -30,6 +30,7 @@
 #include <libocfs.h>
 #endif
 
+extern __u32 disk_timeo;
 
 /* Tracing */
 #define OCFS_DEBUG_CONTEXT    OCFS_DEBUG_CONTEXT_MISC
@@ -38,6 +39,8 @@
 
 __u32 OcfsErrorLogSequence = 0;
 
+extern spinlock_t ocfs_inode_lock;
+
 /*
  * ocfs_create_meta_log_files()
  *
@@ -480,18 +483,18 @@
  * ocfs_release_oin()
  *
  */
-void ocfs_release_oin (ocfs_inode * oin, bool FreeMemory)
+void ocfs_release_oin (ocfs_inode * oin, bool need_lock)
 {
 	ocfs_lock_res *lockres = NULL;
-	ocfs_super *osb = NULL;
 	struct inode *inode;
+	__u64 savedOffset = 0;
 
-	LOG_ENTRY_ARGS ("oin = %p, free = %s\n", oin, FreeMemory? "yes" : "no");
+	LOG_ENTRY_ARGS ("oin=%p, lock=%s\n", oin, need_lock? "yes" : "no");
 
 	if (!oin || !oin->osb)
 		goto bail;
 
-	osb = oin->osb;
+	OCFS_ASSERT(IS_VALID_OIN(oin));
 
 	lockres = oin->lock_res;
 
@@ -506,15 +509,25 @@
 	inode = (struct inode *) oin->inode;
 
 	if (inode) {
-		__u64 savedOffset = oin->file_disk_off;
-
+		savedOffset = oin->file_disk_off;
 		SET_INODE_OIN (inode, NULL);
 		SET_INODE_OFFSET (inode, savedOffset);
 		LOG_TRACE_ARGS ("inode oin cleared / flags: %d / offset: %u.%u\n",
 			inode->i_flags, savedOffset);
 	}
 
+	if (inode) {
+		if (need_lock)
+			spin_lock (&ocfs_inode_lock);
+		oin->inode = NULL;
+		if (atomic_read(&inode->i_count) > 1)
+			atomic_dec(&inode->i_count);
+		if (need_lock)
+			spin_unlock (&ocfs_inode_lock);
+	}
+
 	ocfs_extent_map_destroy (&oin->map);
+	ocfs_extent_map_init (&oin->map);
 
 	/*  Delete the ocfs_sem objects */
 	if (oin->oin_flags & OCFS_INITIALIZED_MAIN_RESOURCE) {
@@ -527,15 +540,14 @@
 			       OCFS_INITIALIZED_PAGING_IO_RESOURCE);
 	}
 
-	if (FreeMemory) {
+	memset (oin, 0, sizeof(ocfs_inode));
 #ifdef OCFS_MEM_DBG
-		ocfs_dbg_slab_free (OcfsGlobalCtxt.oin_cache, oin);
+	ocfs_dbg_slab_free (OcfsGlobalCtxt.oin_cache, oin);
 #else
-		kmem_cache_free (OcfsGlobalCtxt.oin_cache, oin);
+	kmem_cache_free (OcfsGlobalCtxt.oin_cache, oin);
 #endif
-		oin = NULL;
-		ocfs_put_lockres (lockres);
-	}
+	oin = NULL;
+	ocfs_put_lockres (lockres);
 
 	ocfs_put_lockres (lockres);
 bail:
@@ -649,6 +661,22 @@
 	vol_layout->uid = vdh->uid;
 	vol_layout->gid = vdh->gid;
 
+	if (disk_timeo) {
+		vol_layout->disk_hb = vdh->disk_hb;
+		vol_layout->hb_timeo = vdh->hb_timeo;
+	}
+
+	if (!IS_VALID_DISKHB(vol_layout->disk_hb))
+		vol_layout->disk_hb = OCFS_NM_HEARTBEAT_TIME;
+
+	if (!IS_VALID_HBTIMEO(vol_layout->hb_timeo))
+		vol_layout->hb_timeo = OCFS_HB_TIMEOUT;
+
+	if (disk_timeo)
+		osb->max_miss_cnt = (vdh->hb_timeo / vdh->disk_hb) + 1;
+	else
+		osb->max_miss_cnt = MISS_COUNT_VALUE;
+
 	memcpy (vol_layout->vol_id, vol_label->vol_id, MAX_VOL_ID_LENGTH);
 
 	if (vol_layout->dir_node_size == 0) 

Modified: trunk/ocfs2/Common/ocfsgennm.c
===================================================================
--- trunk/ocfs2/Common/ocfsgennm.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgennm.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -416,9 +416,8 @@
 
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, %u)\n", osb, publish, node_num);
 
-	LOG_TRACE_ARGS ("node=%u, id=%u.%u, seq=%u.%u\n", node_num,
-		HI(publish->dir_ent), LO(publish->dir_ent),
-		HI(publish->publ_seq_num), LO(publish->publ_seq_num));
+	LOG_TRACE_ARGS ("pv node=%u, id=%u.%u, seq=%u.%u\n", node_num,
+		       	HILO (publish->dir_ent), HILO (publish->publ_seq_num));
 
 	num_nodes = OCFS_MAXIMUM_NODES;
 	flags = publish->vote_type;
@@ -431,9 +430,16 @@
 		goto finito;
 	}
 
+	/* if invalid lockid */
+	if (ocfs_validate_lockid (osb, publish->dir_ent)) {
+		vote->vote[node_num] = FLAG_VOTE_UPDATE_RETRY;
+		vote->open_handle = false;
+		goto finito;
+	}
+
 	/* Exclusive vote for */
 	status = ocfs_find_update_res (osb, publish->dir_ent, &lockres, NULL,
-				       NULL, (OCFS_NM_HEARTBEAT_TIME/2));
+				       NULL, (OCFS_NM_HEARTBEAT_TIME));
 	if (status < 0) {
 		if (status == -ETIMEDOUT)
 			goto finito;
@@ -452,7 +458,7 @@
 		goto finito;
 	}
 
-	status = ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME/2));
+	status = ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME));
 	if (status < 0) {
 		LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n",
 			       	HILO (lockres->sector_num));
@@ -707,14 +713,19 @@
 	__u32 retry_cnt = 0;
 	bool acq_oin = false;
 	ocfs_file_entry *fe = NULL;
-	bool rls_oin = true;
 	ocfs_inode *oin = NULL;
 	ocfs_sem *oin_sem = NULL;
+	struct inode *inode = NULL;
 
 	LOG_ENTRY ();
 
+/* The macro below takes into account the pre RELEASE/ACQUIRE_LOCK flag days */
+/* Allows for rolling upgrade */
+#define IS_RELEASE_LOCK(_f)	(((_f) & FLAG_FILE_RELEASE_LOCK) ||	\
+				 !((_f) & (FLAG_FILE_ACQUIRE_LOCK | FLAG_FILE_RELEASE_LOCK)))
+
 	oin = (*lockres)->oin;
-	if (oin) {
+	if (oin && !IS_RELEASE_LOCK(flags)) {
 		ocfs_down_sem (&oin->main_res, true);
 		oin->needs_verification = true;
 		status = ocfs_verify_update_oin(osb, oin);
@@ -752,11 +763,6 @@
 			}
 		}
 
-/* The macro below takes into account the pre RELEASE/ACQUIRE_LOCK flag days */
-/* Allows for rolling upgrade */
-#define IS_RELEASE_LOCK(_f)	(((_f) & FLAG_FILE_RELEASE_LOCK) ||	\
-				 !((_f) & (FLAG_FILE_ACQUIRE_LOCK | FLAG_FILE_RELEASE_LOCK)))
-
 		if (((*lockres)->oin->open_hndl_cnt == 0) &&
 		    (!(oin->oin_flags & OCFS_OIN_IN_USE))) {
 			if (!(oin->oin_flags & OCFS_OIN_IN_TEARDOWN) &&
@@ -766,8 +772,6 @@
 					acq_oin = false;
 				}
 
-				rls_oin = false;
-
 				if (!acq_oin) {
 					ocfs_down_sem (oin_sem, true);
 					acq_oin = true;
@@ -784,28 +788,17 @@
 				ocfs_release_lockres (*lockres);
 
 				if (oin && oin->inode) {
-					struct inode *inode = oin->inode;
+					inode = oin->inode;
+					if (inode) {
+						oin->inode = NULL;
+						iput(inode);
+					}
+					ocfs_down_sem (&(oin->paging_io_res), true);
+					ocfs_purge_cache_section (oin, NULL, 0);
+					ocfs_up_sem (&(oin->paging_io_res));
 					inode->i_nlink = 0;
 					d_prune_aliases (inode);
 				}
-
-				if (rls_oin) {
-					ocfs_release_cached_oin (osb, oin);
-					ocfs_release_oin (oin, true);
-				} else {
-					ocfs_down_sem (&(oin->paging_io_res),
-						       true);
-					ocfs_purge_cache_section (oin, NULL, 0);
-					ocfs_up_sem (&(oin->paging_io_res));
-				}
-
-				if (oin && oin->inode) {
-#ifndef USERSPACE_TOOL
-					iput (oin->inode);
-#endif
-					oin->inode = NULL;
-				}
-				*lockres = NULL;
 			}
 			*vote = FLAG_VOTE_NODE;
 			goto finito;
@@ -815,7 +808,6 @@
 		}
 	} else {
 #ifndef USERSPACE_TOOL
-                struct inode *inode = NULL;
                 if (flags & FLAG_FILE_DELETE && IS_RELEASE_LOCK(flags)) {
                         inode = ocfs_get_inode_from_offset(osb, lock_id);
                         if (inode) {

Modified: trunk/ocfs2/Common/ocfsgentrans.c
===================================================================
--- trunk/ocfs2/Common/ocfsgentrans.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgentrans.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/ocfsgenutil.c
===================================================================
--- trunk/ocfs2/Common/ocfsgenutil.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgenutil.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/ocfsgenvolcfg.c
===================================================================
--- trunk/ocfs2/Common/ocfsgenvolcfg.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgenvolcfg.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Common/ocfsgenvote.c
===================================================================
--- trunk/ocfs2/Common/ocfsgenvote.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsgenvote.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -293,7 +293,7 @@
 		goto finally;
 	}
 
-	status = ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME/2));
+	status = ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME));
 	if (status < 0) {
 		LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_RETRY\n",
 			       	HILO (req_master->lock_seq_num));
@@ -402,6 +402,7 @@
 				}
 
 				ocfs_commit_cache (osb, true);
+				osb->needs_flush = false;
 				status = ocfs_get_file_entry (osb, &fe,
 							      req_master->lock_id);
 				if (status < 0) {

Modified: trunk/ocfs2/Common/ocfsheartbeat.c
===================================================================
--- trunk/ocfs2/Common/ocfsheartbeat.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Common/ocfsheartbeat.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -246,8 +246,13 @@
 		if (publish->vote)
 			publish->vote = 0;
 
+#ifdef DISK_VOTE_INLINE
 		ocfs_process_vote (osb, publish_to_vote, vote_node);
 		osb->last_disk_seq = curr_publ_seq;
+#else
+		if (!ocfs_schedule_vote (osb, publish_to_vote, vote_node))
+			osb->last_disk_seq = curr_publ_seq;
+#endif
 	}
 	osb->hbt = 50 + jiffies;
 
@@ -318,11 +323,11 @@
 		if (node_map->time[i] == publish->time) {
 			if (IS_NODE_ALIVE(osb->publ_map, i, num_nodes)) {
 				if (atomic_read (&(node_map->dismount[i]))) {
-					node_map->miss_cnt[i] = MISS_COUNT_VALUE;
+					node_map->miss_cnt[i] = osb->max_miss_cnt /*MISS_COUNT_VALUE*/;
 					atomic_set (&(node_map->dismount[i]), 0);
 				} else
 					(node_map->miss_cnt[i])++;
-				if (node_map->miss_cnt[i] > MISS_COUNT_VALUE) {
+				if (node_map->miss_cnt[i] > osb->max_miss_cnt /*MISS_COUNT_VALUE*/) {
 #if !defined(USERSPACE_TOOL)
 					printk ("ocfs: Removing %s (node %d) "
 						"from clustered device (%s)\n",
@@ -370,3 +375,63 @@
 	LOG_EXIT ();
 	return;
 }				/* ocfs_update_publish_map */
+
+
+/*
+ * ocfs_schedule_vote()
+ *
+ */
+int ocfs_schedule_vote (ocfs_super * osb, ocfs_publish * publish, __u32 node_num)
+{
+	ocfs_sched_vote *sv = NULL;
+	int status = 0;
+
+	LOG_ENTRY ();
+
+	sv = ocfs_malloc (sizeof (ocfs_sched_vote));
+	if (sv == NULL) {
+		LOG_ERROR_STATUS (status = -ENOMEM);
+		goto bail;
+	}
+	memset (sv, 0, sizeof (ocfs_sched_vote));
+
+	sv->osb = osb;
+	sv->node_num = node_num;
+	memcpy (&sv->publish_sect, publish, OCFS_SECTOR_SIZE);
+
+	INIT_TQUEUE (&sv->sv_tq, ocfs_process_vote_worker, sv);
+
+	schedule_task (&sv->sv_tq);
+
+bail:
+	if (status < 0)
+		ocfs_safefree (sv);
+
+	LOG_EXIT_STATUS (status);
+	return status;
+}				/* ocfs_schedule_vote */
+
+
+/*
+ * ocfs_process_vote_worker()
+ *
+ */
+void ocfs_process_vote_worker (void * val)
+{
+	ocfs_sched_vote *sv = (ocfs_sched_vote *)val;
+	ocfs_publish *publish = NULL;
+
+	LOG_ENTRY ();
+
+	if (sv) {
+		publish = (ocfs_publish *) &sv->publish_sect;
+		if (!IS_VALID_OSB (sv->osb) || !publish)
+			goto bail;
+		ocfs_process_vote (sv->osb, publish, sv->node_num);
+		ocfs_safefree (sv);
+	}
+
+bail:
+	LOG_EXIT ();
+	return ;
+}				/* ocfs_process_vote_worker */

Modified: trunk/ocfs2/Linux/inc/ocfsbitmap.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfsbitmap.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfsbitmap.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/inc/ocfsdlmp.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfsdlmp.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfsdlmp.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/inc/ocfsfile.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfsfile.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfsfile.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/inc/ocfshash.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfshash.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfshash.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/inc/ocfsioctl.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfsioctl.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfsioctl.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/inc/ocfsmain.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfsmain.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfsmain.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/inc/ocfsmount.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfsmount.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfsmount.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/inc/ocfsport.h
===================================================================
--- trunk/ocfs2/Linux/inc/ocfsport.h	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/inc/ocfsport.h	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/ocfsbitmap.c
===================================================================
--- trunk/ocfs2/Linux/ocfsbitmap.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsbitmap.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/ocfsdlm.c
===================================================================
--- trunk/ocfs2/Linux/ocfsdlm.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsdlm.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -16,7 +16,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -31,7 +31,6 @@
 #include <libocfs.h>
 #endif
 
-
 /* Tracing */
 #define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_NM
 
@@ -175,6 +174,7 @@
 	char proc[16];
 	int status = 0;
 	int flush_counter = 0;
+	__u32 disk_hb = 0;
 
 	LOG_ENTRY ();
 
@@ -189,6 +189,8 @@
 	osb->dlm_task = current;
 #endif
 
+	disk_hb = osb->vol_layout.disk_hb;
+
 	/* The delay changes based on multiplier */
 	while (!(OcfsGlobalCtxt.flags & OCFS_FLAG_SHUTDOWN_VOL_THREAD) &&
 	       !(osb->osb_flags & OCFS_OSB_FLAGS_BEING_DISMOUNTED)) {
@@ -196,7 +198,7 @@
 		if (OcfsGlobalCtxt.hbm == 0)
 			OcfsGlobalCtxt.hbm = DISK_HBEAT_NO_COMM;
 
-		ocfs_sleep (OCFS_NM_HEARTBEAT_TIME);
+		ocfs_sleep (disk_hb);
 
 		if ((OcfsGlobalCtxt.flags & OCFS_FLAG_SHUTDOWN_VOL_THREAD) ||
 		    (osb->osb_flags & OCFS_OSB_FLAGS_BEING_DISMOUNTED))

Modified: trunk/ocfs2/Linux/ocfsfile.c
===================================================================
--- trunk/ocfs2/Linux/ocfsfile.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsfile.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/ocfshash.c
===================================================================
--- trunk/ocfs2/Linux/ocfshash.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfshash.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -16,7 +16,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/ocfsioctl.c
===================================================================
--- trunk/ocfs2/Linux/ocfsioctl.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsioctl.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.

Modified: trunk/ocfs2/Linux/ocfsipc.c
===================================================================
--- trunk/ocfs2/Linux/ocfsipc.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsipc.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -80,13 +80,15 @@
 			if (status != -EBADF) {
 				LOG_ERROR_STATUS (status);
 			} else {
-				/* Thread is being killed. */
 				goto finally;
 			}
 		}
 	}
 
       finally:
+	/* Flush all scheduled tasks */
+	flush_scheduled_tasks ();
+
 	if (OcfsIpcCtxt.send_sock) {
 		sock_release (OcfsIpcCtxt.send_sock);
 		OcfsIpcCtxt.send_sock = NULL;
@@ -97,9 +99,6 @@
 		OcfsIpcCtxt.recv_sock = NULL;
 	}
 
-	/* Flush all scheduled tasks */
-	flush_scheduled_tasks ();
-
 	/* signal main thread of ipcdlm's exit */
 	complete (&(OcfsIpcCtxt.complete));
 
@@ -432,7 +431,7 @@
 	if (error < 0) {
 		if (error == -ERESTARTSYS) {
 			status = -EBADF;
-			LOG_TRACE_STR ("Shutting down ipcdlm");
+			LOG_TRACE_STR ("netdlm recvd a kill signal");
 			goto bail;
 		} else {
 			LOG_ERROR_ARGS ("unable to recvmsg, error=%d", error);

Modified: trunk/ocfs2/Linux/ocfsmain.c
===================================================================
--- trunk/ocfs2/Linux/ocfsmain.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsmain.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -48,6 +48,8 @@
 __u32 mount_cnt;          /* Number of volumes currently mounted */
 bool mount_cnt_inc;       /* true when mount_cnt is inc by 1 during first mount */
 
+spinlock_t ocfs_inode_lock;		/* protects ops on inode->i_count in ocfs */
+
 #define KERN_OCFS 989 
 static ctl_table ocfs_dbg_table[] = {
 	{1, "debug_level", &debug_level, sizeof (__u32), 0644, NULL, &proc_dointvec, 
@@ -169,7 +171,8 @@
 __u32 ip_port = 0;
 char *guid = NULL;
 __u32 cs = 0;
-__u32 comm_voting = 0;
+__u32 comm_voting = 1;
+__u32 disk_timeo = 0;
 
 MODULE_PARM (node_name, "s");
 MODULE_PARM_DESC(node_name, "Name of this machine in the cluster");
@@ -191,6 +194,8 @@
 MODULE_PARM_DESC(cs, "Checksum");
 MODULE_PARM (comm_voting, "i");
 MODULE_PARM_DESC(comm_voting, "Enable/Disable network dlm");
+MODULE_PARM (disk_timeo, "i");
+MODULE_PARM_DESC(disk_timeo, "Use heartbeart and node timeout values on disk");
 
 /*
  * ocfs_parse_options()
@@ -410,6 +415,8 @@
 
 	OcfsGlobalCtxt.hbm = DISK_HBEAT_COMM_ON;
 
+	spin_lock_init (&ocfs_inode_lock);
+
 	spin_lock_init (&osb_id_lock);
 	spin_lock (&osb_id_lock);
 	osb_id = 0;
@@ -897,7 +904,7 @@
 	osb = ((ocfs_super *)(sb->u.generic_sbp));
 	OCFS_ASSERT(IS_VALID_OSB(osb));
 
-	atomic_inc (&dir->i_count);
+//	atomic_inc (&dir->i_count);
 
 	if (dentry->d_name.len > OCFS_MAX_FILENAME_LENGTH) {
 		ret = ERR_PTR (-ENAMETOOLONG);
@@ -942,7 +949,7 @@
 	if (fe)
 		ocfs_release_file_entry (fe);
 
-	atomic_dec (&dir->i_count);
+//	atomic_dec (&dir->i_count);
 	LOG_EXIT_PTR (ret);
 	return ret;
 }				/* ocfs_lookup */
@@ -955,7 +962,6 @@
 {
         ocfs_super *osb = NULL;
         __u32 numbits, freebits = 0;
-        // ocfs_lock_res *pLockResource;
         int status = 0;
         __u8 lockbuf[512];
         ocfs_bitmap_lock *bm_lock = (ocfs_bitmap_lock *)lockbuf;
@@ -994,7 +1000,32 @@
 }                               /* ocfs_statfs */
 
 
+/*
+ * ocfs_sync_inode()
+ *
+ */
+static inline int ocfs_sync_inode (struct inode *inode)
+{
+	int status = 0;
 
+	LOG_ENTRY_ARGS ("(inode=0x%p)\n", inode);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+	filemap_fdatawrite(inode->i_mapping);
+	status = sync_mapping_buffers(inode->i_mapping);
+#else
+	filemap_fdatasync(inode->i_mapping);
+	status = fsync_inode_buffers(inode);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
+	if (!status)	       
+		status = fsync_inode_data_buffers(inode);
+#endif
+#endif
+	LOG_EXIT_STATUS (status);
+	return status;
+}				/* ocfs_sync_inode */
+
+
 /*
  * ocfs_block_symlink()
  *
@@ -1135,7 +1166,7 @@
 	}
 
 	if (!inode || !inode_data_is_oin (inode)) {
-		LOG_ERROR_STR ("bad inode or inode has no oin");
+		LOG_TRACE_STR ("bad inode or inode has no oin");
 		goto bail;
 	}
 
@@ -1151,7 +1182,8 @@
 	status = ocfs_lookup_file_allocation (osb, oin, vbo, &lbo,
 					   len, &numExts, &ioRuns);
 	if (status < 0) {
-		LOG_ERROR_STATUS (status);
+		if (status != -ESPIPE)
+			LOG_ERROR_STATUS (status);
 		goto bail;
 	}
 
@@ -1198,7 +1230,7 @@
 	LOG_ENTRY_ARGS ("(0x%p, %d)\n", inode, iblock);
 
 	if (!inode || !inode_data_is_oin (inode)) {
-		LOG_ERROR_STR ("bad inode or inode has no oin");
+		LOG_TRACE_STR ("bad inode or inode has no oin");
 		err = -1;
 		goto bail;
 	}
@@ -1214,7 +1246,8 @@
 	status = ocfs_lookup_file_allocation (osb, oin, vbo, &lbo,
 					len, &numExts, &ioRuns);
 	if (status < 0) {
-		LOG_ERROR_STATUS (status);
+		if (status != -ESPIPE)
+			LOG_ERROR_STATUS (status);
 		err = -1;
 		goto bail;
 	}
@@ -1259,8 +1292,7 @@
 	}
 
 	if (!inode || !inode_data_is_oin (inode)) {
-		LOG_TRACE_STR ("bad inode or inode has no oin");
-		ret = -EIO;
+		LOG_ERROR_ARGS ("inode=0x%p, ret=%d", inode, ret = -EIO);
 		goto bail;
 	}
 	oin = ((ocfs_inode *)inode->u.generic_ip);
@@ -1269,9 +1301,15 @@
 	osb = (ocfs_super *) oin->osb;
 	OCFS_ASSERT(IS_VALID_OSB(osb));
 
+	if (oin->inode != inode) {
+		LOG_ERROR_ARGS ("oin->inode=0x%p, inode=0x%p, ret=%d",
+				oin->inode, inode, ret = -EIO);
+		goto bail;
+	}
+
 	lockres = oin->lock_res;
 	if (lockres == NULL) {
-		ret = -EIO;
+		LOG_ERROR_ARGS ("ret=%d", ret = -EIO);
 		goto bail;
 	}
 
@@ -1290,12 +1328,11 @@
 		goto bail;
 	}
 
-	if (filp->f_flags & O_DIRECT) {
-		/* anything special for o_direct? */
-		LOG_TRACE_STR ("O_DIRECT");
-	} else {
-		LOG_TRACE_ARGS ("non O_DIRECT write, fileopencount=%d\n",
-				oin->open_hndl_cnt);
+	LOG_TRACE_ARGS ("%s write on %*s\n",
+		       	(filp->f_flags & O_DIRECT ? "o_direct" : "buffered"),
+		       	filp->f_dentry->d_name.len, filp->f_dentry->d_name.name);
+
+	if (!(filp->f_flags & O_DIRECT)) {
 		if (oin->open_hndl_cnt > 1) {
 			if (oin->oin_flags & OCFS_OIN_OPEN_FOR_WRITE) {
 				LOG_TRACE_STR
@@ -1333,7 +1370,7 @@
 
 	if (newsize > inode->i_size) {
 		writingAtEOF = true;
-		LOG_TRACE_STR ("Writing at EOF"); 
+		LOG_TRACE_STR ("Writing at EOF");
 	}
 
 	LOG_TRACE_ARGS ("ppos=%u.%u newsize=%u.%u cursize=%u.%u\n",
@@ -1395,12 +1432,13 @@
 		ocfs_up_sem (&(oin->main_res));
 		acquired = false;
 	}
-        if (inode && oin && !oin->cache_enabled && !(filp->f_flags & O_DIRECT)) {
-                fsync_inode_buffers(inode);
+	if (inode && oin && !oin->cache_enabled && !(filp->f_flags & O_DIRECT)) {
+		filemap_fdatasync(inode->i_mapping);
+		fsync_inode_buffers(inode);
 #if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
-                fsync_inode_data_buffers(inode);
+		fsync_inode_data_buffers(inode);
 #endif
-        }
+	}
 
 	ocfs_put_lockres (lockres);
 
@@ -1424,10 +1462,8 @@
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", filp, buf, count,
                         filp->f_dentry->d_name.len, filp->f_dentry->d_name.name);
 
-
 	if (!inode || !inode_data_is_oin (inode)) {
-		LOG_ERROR_STR ("Bad inode or inode has no oin");
-		ret = -EINVAL;
+		LOG_ERROR_ARGS ("inode=0x%p, ret=%d", inode, ret = -EINVAL);
 		goto bail;
 	}
 	oin = ((ocfs_inode *)inode->u.generic_ip);
@@ -1435,12 +1471,17 @@
 
 	osb = (ocfs_super *) oin->osb;
 	OCFS_ASSERT(IS_VALID_OSB(osb));
-
-	if (filp->f_flags & O_DIRECT) {
-		/* anything special for o_direct? */
-		LOG_TRACE_STR ("O_DIRECT");
+ 
+	if (oin->inode != inode) {
+		LOG_ERROR_ARGS ("oin->inode=0x%p, inode=0x%p, ret=%d",
+				oin->inode, inode, ret = -EIO);
+		goto bail;
 	}
 
+	LOG_TRACE_ARGS ("%s read on %*s\n",
+		       	(filp->f_flags & O_DIRECT ? "o_direct" : "buffered"),
+		       	filp->f_dentry->d_name.len, filp->f_dentry->d_name.name);
+
 	if (OIN_NEEDS_VERIFICATION (oin)) {
 		ocfs_down_sem (&(oin->main_res), true);
 		acquired = true;
@@ -1717,7 +1758,8 @@
                 	if (err)
                         	goto out;
                 	new_iobuf = 1;
-        	 }
+        	 } else
+			new_iobuf = 0;
 #endif
                 inuse = true;
                 totalioblocks = 0;
@@ -1831,8 +1873,8 @@
 
 out:
 #ifdef KERNEL_NO_F_IOBUF
-        if (inuse)
-           free_kiovec_sz (1, &iobuf, &nbhs);
+	if (inuse)
+		free_kiovec_sz (1, &iobuf, &nbhs);
 #else
 	if (inuse) {
 		if (!new_iobuf)
@@ -1841,6 +1883,8 @@
 			free_kiovec_sz(1, &iobuf, &nbhs);
 	}
 #endif
+	if (err < 0)
+		LOG_ERROR_ARGS("err=%d", err);
 	return err;
 }				/* ocfs_rw_direct */
 
@@ -1984,7 +2028,6 @@
 	ocfs_inode *ParentOin = NULL;
 	ocfs_inode *NewOIN = NULL;
 	ocfs_inode *oin = NULL;
-	bool bAcquiredOSB = false;
 	bool bAcquiredOIN = false;
 	bool bClearInUse = false;
 	bool new_oin = false;
@@ -2010,104 +2053,86 @@
 	}
 	parentDirCluster = ParentDirNodeOffset;
 
-	ocfs_down_sem (&(osb->osb_res), true);
-	bAcquiredOSB = true;
-
 	/*  If the volume has been shutdown, fail the request */
 	if (osb->osb_flags & OCFS_OSB_FLAGS_SHUTDOWN) {
 		LOG_ERROR_STR ("Volume has been shutdown");
 		status = -EACCES;
 		goto leave;
 	}
-	ocfs_up_sem (&(osb->osb_res));
-	bAcquiredOSB = false;
 
 	if ((fe = ocfs_allocate_file_entry ()) == NULL) {
 		LOG_ERROR_STATUS (status = -ENOMEM);
 		goto leave;
 	}
 
-	if (create)
-		status = -ENOENT;
-	else {
-		/* kch - for an open request we are already given the 
-		 * inode, and therefore we are given the oin too */
+	if (!create) {
+		/* Take inode->i_sem */
 		down(&inode->i_sem);
+
 		oin = NULL;
-		if (inode_data_is_oin (inode)) {
+		if (inode_data_is_oin (inode))
 			oin = ((ocfs_inode *)inode->u.generic_ip);
-		}
-		status = -EFAIL;
-                if (oin != NULL) {
+
+		if (oin) {
 			OCFS_ASSERT(IS_VALID_OIN(oin));
-                        if (!(oin->oin_flags & OCFS_OIN_IN_TEARDOWN) &&
-                            !(oin->oin_flags & OCFS_OIN_DELETE_ON_CLOSE)) {
-                                OCFS_SET_FLAG (oin->oin_flags, OCFS_OIN_IN_USE);
-
-				status = 0;
+			if (!(oin->oin_flags & OCFS_OIN_IN_TEARDOWN) &&
+			    !(oin->oin_flags & OCFS_OIN_DELETE_ON_CLOSE)) {
+				OCFS_SET_FLAG (oin->oin_flags, OCFS_OIN_IN_USE);
+				bClearInUse = true;
+				up(&inode->i_sem);
+				goto no_set_inode_oin;
+			} else {
+				up(&inode->i_sem);
+				status = -EACCES;
+				LOG_TRACE_ARGS ("status=%d, flg=0x%08x\n",
+					       	status, oin->oin_flags);
+				goto leave;
 			}
-			if (status < 0) {
-                               if (oin->oin_flags & OCFS_OIN_IN_TEARDOWN)
-                                       LOG_ERROR_ARGS ("oin (%p) in teardown", oin);
-                               else
-                                       LOG_ERROR_ARGS ("oin (%p) deleted", oin);
-			}
-		} else {
-			/* now it IS possible to have an inode but no OIN attached yet
-			 * must be loaded now to open file */
-			status = -ENOENT;
 		}
-		up(&inode->i_sem);
 	}
 
-	if (status < 0) {
-		if (status != -ENOENT) {
-			LOG_ERROR_STATUS (status);
+	/*  Look on the disk now ... */
+	status = ocfs_find_files_on_disk (osb, ParentDirNodeOffset,
+					  &(dentry->d_name), fe, NULL);
+	if (status >= 0) {
+		if (create) {
+			status = -EEXIST;
 			goto leave;
 		}
-
-		/*  Look on the disk now ... */
-		status = ocfs_find_files_on_disk (osb, ParentDirNodeOffset, &(dentry->d_name),
-					  fe, NULL);
-		if (status >= 0) {
-			oin = NULL;
-			ocfs_down_sem (&(osb->osb_res), true);
-			bAcquiredOSB = true;
-			status = ocfs_create_oin_from_entry (osb, fe, &oin,
+		oin = NULL;
+		ocfs_down_sem (&(osb->osb_res), true);
+		status = ocfs_create_oin_from_entry (osb, fe, &oin,
 						     parentDirCluster, NULL);
-			new_oin = true;
-			ocfs_up_sem (&(osb->osb_res));
-			bAcquiredOSB = false;
+		new_oin = true;
+		ocfs_up_sem (&(osb->osb_res));
 
-			if (status >= 0) {
-				/*  Set Oin in Use... */
-				bClearInUse = true;
-			}
+		if (status >= 0)
+			bClearInUse = true;
 
-			if (status < 0) {
-				if (status != -ENOENT && status != -EINTR) {
-					LOG_ERROR_STATUS (status);
-					goto leave;
-				}
-			}
-		} else if (!create) {
-			LOG_TRACE_STR
-			    ("Open request made for nonexistent file!");
-			status = -ENOENT;
+		if (status < 0) {
+			if (status != -ENOENT && status != -EINTR)
+				LOG_ERROR_STATUS (status);
+			up(&inode->i_sem);
 			goto leave;
 		}
-	}
-
-	if (status < 0) {	/* not found on disk or in mem */
-		if (!create || status != -ENOENT) {
-			LOG_ERROR_STATUS (status);
+	} else {
+		if (create)
+			goto no_set_inode_oin;
+		else {
+			up(&inode->i_sem);
+			status = -ENOENT;
 			goto leave;
 		}
-	} else {
-		bClearInUse = true;
 	}
+	atomic_inc(&inode->i_count);
+	oin->inode = inode;
+	SET_INODE_OIN (inode, oin);
+	/* Release inode->i_sem */
+	up(&inode->i_sem);
 
-	if (status < 0) {	/* the CREATE case */
+no_set_inode_oin:
+
+	if (create) {	/* the CREATE case */
 		__u64 fileEntry = 0;
 		ocfs_file_entry *tempFileEnt;
 
@@ -2228,30 +2253,6 @@
 		*newofile = OFile;
 		goto leave;
 	} else {		/* the OPEN case */
-                /* check if another process doing an open */
-                /* concurrently has just set the oin */
-                down(&inode->i_sem);
-                if (new_oin) {
-                        if (inode_data_is_oin (inode)) {
-                                // delete the oin we just made 
-                                oin->inode = NULL;
-                                oin->lock_res = NULL;
-                                ocfs_release_oin(oin, true);
-                                // and use the correct one
-                                oin = (ocfs_inode *)inode->u.generic_ip;
-				OCFS_ASSERT(IS_VALID_OIN(oin));
-                        } else {
-                                oin->inode = inode;
-                                SET_INODE_OIN (inode, oin);
-                        }
-                }
- 
-                /* we should now have a single oin regardless */
-                /* of how many concurrent openers at this point */
-                /* so take the oin->main_res so we won't need the i_sem */
-
-		up(&inode->i_sem);
- 
 		oin_sem = &(oin->main_res);
 		if (!bAcquiredOIN) {
 			ocfs_down_sem (oin_sem, true);
@@ -2266,7 +2267,8 @@
 		}
 
 		/* only call ocfs_verify_update_oin if there's a good inode */
-		if (oin->inode == inode && OIN_NEEDS_VERIFICATION(oin)) {
+		OCFS_ASSERT (oin->inode == inode);
+		if (OIN_NEEDS_VERIFICATION(oin)) {
 			status = ocfs_verify_update_oin (osb, oin);
 			if (status < 0) {
 				LOG_ERROR_ARGS ("status=%d, name=%*s", status,
@@ -2304,18 +2306,13 @@
 		} else {
 			ocfs_extent_map_destroy (&oin->map);
 			ocfs_extent_map_init (&oin->map);
-//			ocfs_delete_all_extent_maps (oin);
 			if (mode & O_DIRECT)
 				OCFS_SET_FLAG(oin->oin_flags, OCFS_OIN_OPEN_FOR_DIRECTIO);
 			else {
 				OCFS_CLEAR_FLAG(oin->oin_flags, OCFS_OIN_OPEN_FOR_DIRECTIO);
-				fsync_inode_buffers(inode);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
-				fsync_inode_data_buffers(inode);
-#endif
+				ocfs_sync_inode (inode);
 				if (inode->i_data.nrpages)
 					truncate_inode_pages(&inode->i_data, 0);
-
 			}
 		}
 
@@ -2346,10 +2343,8 @@
 		}
 
 		ocfs_down_sem (&(osb->osb_res), true);
-		bAcquiredOSB = true;
 		(osb->file_open_cnt)++;
 		ocfs_up_sem (&(osb->osb_res));
-		bAcquiredOSB = false;
 
 		*newofile = OFile;
 		status = 0;
@@ -2377,11 +2372,6 @@
 		bAcquiredOIN = false;
 	}
 
-	if (bAcquiredOSB) {
-		ocfs_up_sem (&(osb->osb_res));
-		bAcquiredOSB = false;
-	}
-
 	ocfs_release_file_entry (fe);
 
 	LOG_EXIT_STATUS (status);
@@ -2403,7 +2393,7 @@
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", inode, file, 
                         file->f_dentry->d_name.len, file->f_dentry->d_name.name);
 
-	atomic_inc (&parent->i_count);
+//	atomic_inc (&parent->i_count);
 	status = ocfs_create_or_open_file (inode, parent, dentry, file->f_flags,
 					   &ofile, NODEV);
 	if (status < 0) {
@@ -2416,13 +2406,15 @@
 		goto bail;
 	}
 
+	OCFS_ASSERT (ofile);
+
 	file->private_data = (void *) ofile;
 	ofile->k_file = file;
 	ret = 0;
 
       bail:
-	if (ret != 0)
-		atomic_dec (&parent->i_count);
+//	if (ret != 0)
+//		atomic_dec (&parent->i_count);
 	LOG_TRACE_ARGS
 	    ("exiting: file=%p dentry=%p inode=%p oin=%p kiovec=%d\n",
 	     file, file->f_dentry, file->f_dentry->d_inode,
@@ -2438,7 +2430,7 @@
 static int ocfs_mknod (struct inode *dir, struct dentry *dentry, int mode, int dev)
 {
 	int status;
-	struct inode *inode;
+	struct inode *inode = NULL;
 	ocfs_file *newofile = NULL;
 	int error = -EACCES;
 	ocfs_file_entry *fe = NULL;
@@ -2446,7 +2438,7 @@
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, %d, '%*s')\n", dir, dentry, mode,
 			dev, dentry->d_name.len, dentry->d_name.name);
 
-	atomic_inc (&dir->i_count);
+//	atomic_inc (&dir->i_count);
 
 	status = ocfs_create_or_open_file (NULL, dir, dentry, mode, &newofile,
 					   dev);
@@ -2474,6 +2466,7 @@
 			fe->file_size = 0;
 			fe->modify_time = fe->create_time = CURRENT_TIME;
 			inode->i_ino = LO (oin->file_disk_off);
+			atomic_inc(&inode->i_count);
 			oin->inode = inode;
 
 			ocfs_populate_inode (inode, fe, mode, oin);
@@ -2488,12 +2481,14 @@
 		error = -ENOSPC;
 	} else if (status == -EINTR) {
 		error = -EINTR;
+	} else if (status == -ENOENT) {
+		error = -ENOENT;
 	} else {
 		LOG_ERROR_STATUS (status);
 	}
 
       bail:
-	atomic_dec (&dir->i_count);
+//	atomic_dec (&dir->i_count);
 
 	/* uh, hmmm... */
 	if (newofile != NULL)
@@ -2640,20 +2635,30 @@
 static int ocfs_unlink (struct inode *dir, struct dentry *dentry)
 {
 	int status, tmpstat;
-	struct inode *inode;
+	struct inode *inode = NULL;
 	ocfs_inode *oin = NULL;
 	int retval = -EBUSY;
 	__u64 off;
 	ocfs_lock_res *lockres;
 	ocfs_super *osb = NULL;
+	int max_cnt = 1;
 
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dir, dentry,
-                        dentry->d_name.len, dentry->d_name.name);
+			dentry->d_name.len, dentry->d_name.name);
 
 	inode = dentry->d_inode;
 
-	if ((atomic_read (&inode->i_count) > 1)
+	if (inode_data_is_oin (inode))
+		oin = ((ocfs_inode *)inode->u.generic_ip);
+
+	if (oin && oin->inode)
+		max_cnt++;
+
+	if ((atomic_read (&inode->i_count) > max_cnt)
 	    || (atomic_read (&dentry->d_count) > 2)) {
+		LOG_TRACE_ARGS("inode->i_count=%d, dentry->d_count=%d\n",
+			       atomic_read (&inode->i_count),
+			       atomic_read (&dentry->d_count));
 		goto bail;
 	}
 
@@ -2720,13 +2725,23 @@
 	struct inode *old_inode = old_dentry->d_inode;
 	struct inode *new_inode = new_dentry->d_inode;
 	int error = 0;
+	ocfs_inode *old_oin = NULL;
+	int max_cnt = 1;
 
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p, 0x%p, from='%*s' to='%*s')\n",
 			old_dir, old_dentry, new_dir, new_dentry,
                         old_dentry->d_name.len, old_dentry->d_name.name,
                         new_dentry->d_name.len, new_dentry->d_name.name);
 
-	if (atomic_read (&old_inode->i_count) > 1) {
+	if (inode_data_is_oin (old_inode))
+		old_oin = ((ocfs_inode *)old_inode->u.generic_ip);
+
+	if (old_oin && old_oin->inode)
+		max_cnt++;
+
+	if (atomic_read (&old_inode->i_count) > max_cnt) {
+		LOG_TRACE_ARGS("old_inode->i_count=%d\n",
+			       atomic_read (&old_inode->i_count));
 		error = -EBUSY;
 		goto bail;
 	} else if (atomic_read (&old_dentry->d_count) > 2) {
@@ -2813,7 +2828,7 @@
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, symname='%s' actual='%*s')\n", dir, dentry, symname,
                         dentry->d_name.len, dentry->d_name.name);
 
-	atomic_inc (&dir->i_count);
+//	atomic_inc (&dir->i_count);
 	if (!dentry->d_parent || !dentry->d_parent->d_inode) {
 		LOG_ERROR_STR ("failed to get parent inode!");
 		error = -EIO;
@@ -2878,7 +2893,7 @@
 	}
 
       bail:
-	atomic_dec (&dir->i_count);
+//	atomic_dec (&dir->i_count);
 	LOG_EXIT_LONG (error);
 	return error;
 }				/* ocfs_symlink */
@@ -2894,7 +2909,8 @@
         ocfs_super * osb;
         ocfs_inode *oin;
         struct dentry *dentry;
-        struct inode *parent;
+	bool last_close = false;
+//        struct inode *parent;
 
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", inode, file,
                         file->f_dentry->d_name.len, file->f_dentry->d_name.name);
@@ -2928,13 +2944,15 @@
         ocfs_down_sem (&(osb->osb_res), true);
         osb->file_open_cnt--;
         oin->open_hndl_cnt--;
+	if (!oin->open_hndl_cnt)
+		last_close = true;
         ocfs_up_sem (&(osb->osb_res));
                 
         if (oin->oin_flags & OCFS_OIN_ROOT_DIRECTORY) {
                 ocfs_up_sem (&(oin->main_res));
                 goto do_parent_dec;
         }
-                
+
         LOG_TRACE_ARGS ("openhandles: %d / osbfiles: %d / refcount: %d\n",
                          oin->open_hndl_cnt, osb->file_open_cnt,
                         atomic_read(&dentry->d_count)); 
@@ -2944,47 +2962,37 @@
         /* no hard links yet so who cares */
         if (!atomic_read(&dentry->d_count)) { 
 		if (oin->oin_flags & OCFS_OIN_OPEN_FOR_DIRECTIO)  {
-			fsync_inode_buffers(inode);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
-			fsync_inode_data_buffers(inode);
-#endif
-			if (inode->i_data.nrpages)
-				truncate_inode_pages(&inode->i_data, 0);
+			ocfs_sync_inode (inode);
 			OCFS_CLEAR_FLAG(oin->oin_flags, OCFS_OIN_OPEN_FOR_DIRECTIO);
-			}
+		}
                 if (oin->oin_flags & OCFS_OIN_NEEDS_DELETION ||
                     oin->oin_flags & OCFS_OIN_IN_USE) {
                         ocfs_up_sem (&(oin->main_res));
                         goto do_parent_dec; 
                 }
-			fsync_inode_buffers(inode);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
-			fsync_inode_data_buffers(inode);
-#endif
-			if (inode->i_data.nrpages)
-			           truncate_inode_pages(&inode->i_data, 0);
+		ocfs_sync_inode (inode);
 
                 ocfs_up_sem (&(oin->main_res));
+                ocfs_release_cached_oin (osb, oin);
                 ocfs_release_oin (oin, true);
         } else {
-			fsync_inode_buffers(inode);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
-			fsync_inode_data_buffers(inode);
-#endif
-			if (inode->i_data.nrpages)
-		                    truncate_inode_pages(&inode->i_data, 0);
+		ocfs_sync_inode (inode);
 			
                 ocfs_up_sem (&(oin->main_res));
-                ocfs_release_cached_oin (osb, oin);
+//                ocfs_release_cached_oin (osb, oin);
         }
-        
+
+	if (last_close && inode->i_data.nrpages) {
+		truncate_inode_pages(&inode->i_data, 0);
+	}
+
 do_parent_dec:
-        if (dentry && dentry->d_parent && 
-            dentry->d_parent->d_inode) {
-                parent = dentry->d_parent->d_inode;
-                if (parent)
-                        atomic_dec (&parent->i_count);
-        }
+//        if (dentry && dentry->d_parent && 
+//            dentry->d_parent->d_inode) {
+//                parent = dentry->d_parent->d_inode;
+//                if (parent)
+//                        atomic_dec (&parent->i_count);
+//        }
 
 bail:
 	LOG_EXIT_LONG (0);
@@ -3000,10 +3008,8 @@
 	LOG_ENTRY_ARGS ("(0x%p, '%*s')\n", file,
                         file->f_dentry->d_name.len, file->f_dentry->d_name.name);
 
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
-	fsync_inode_data_buffers(file->f_dentry->d_inode);
-#endif
-	fsync_inode_buffers(file->f_dentry->d_inode);
+	ocfs_sync_inode (file->f_dentry->d_inode);
+
 	LOG_EXIT_LONG (0);
 	return 0;
 }				/* ocfs_flush */
@@ -3016,10 +3022,9 @@
 {
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, %d, '%*s')\n", file, dentry, datasync,
                         dentry->d_name.len, dentry->d_name.name);
-#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,18)
-	fsync_inode_data_buffers(dentry->d_inode);
-#endif
-	fsync_inode_buffers(dentry->d_inode);
+
+	ocfs_sync_inode (dentry->d_inode);
+
 	LOG_EXIT_LONG (0);
 	return 0;
 }				/* ocfs_sync_file */
@@ -3167,16 +3172,28 @@
  */
 static void ocfs_put_inode (struct inode *inode)
 {
-	ocfs_inode *oin;
+	ocfs_inode *oin = NULL;
+	ocfs_super *osb = NULL;
 
 	LOG_ENTRY_ARGS ("(0x%p)\n", inode);
 
-	if (inode_data_is_oin(inode) && (atomic_read (&inode->i_count) == 1) ) {
+	if (inode_data_is_oin(inode))
 		oin = ((ocfs_inode *)inode->u.generic_ip);
+
+	if (oin && oin->inode) {
+		osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
+		OCFS_ASSERT(IS_VALID_OSB(osb));
 		OCFS_ASSERT(IS_VALID_OIN(oin));
-		ocfs_extent_map_destroy (&oin->map);
-		ocfs_extent_map_init (&oin->map);
-	} 
+		OCFS_ASSERT(oin->inode == inode);
+		spin_lock (&ocfs_inode_lock);
+		if ((atomic_read (&inode->i_count) == 2) &&
+		    (inode->i_ino != OCFS_ROOT_INODE_NUMBER)) {
+			ocfs_release_cached_oin (osb, oin);
+			ocfs_release_oin (oin, false);
+		}
+		spin_unlock (&ocfs_inode_lock);
+	}
+
 	LOG_EXIT ();
 	return;
 }				/* ocfs_put_inode */
@@ -3200,10 +3217,11 @@
 	if (!inode)
 		goto bail;
 
-	if (inode_data_is_oin (inode)) {
+	if (inode_data_is_oin(inode))
 		oin = ((ocfs_inode *)inode->u.generic_ip);
-		OCFS_ASSERT(IS_VALID_OIN(oin));
 
+	if (oin && IS_VALID_OIN(oin)) {
+
 		/* mind you, the osb could have been freed because of the */
 		/* way vfs clears the inodes on umount */
 		osb = (ocfs_super *) oin->osb;
@@ -3222,6 +3240,8 @@
 		ocfs_extent_map_destroy (&oin->map);
 		ocfs_extent_map_init (&oin->map);
 
+		if (oin->inode && inode != oin->inode)
+			BUG();
 		ocfs_release_cached_oin (osb, oin);
 		ocfs_release_oin (oin, true);
 		oin = NULL;
@@ -3304,7 +3324,7 @@
 	}
 
 	parentInode = dentry->d_parent->d_inode;
-	atomic_inc (&parentInode->i_count);
+//	atomic_inc (&parentInode->i_count);
 	newsize = attr->ia_size;
 
 	if (attr->ia_valid & ATTR_MODE)
@@ -3410,7 +3430,7 @@
 	inode_setattr (inode, attr);
 
       bail:
-	atomic_dec (&parentInode->i_count);
+//	atomic_dec (&parentInode->i_count);
       bail2:
 	ocfs_release_file_entry(fe);
 	LOG_EXIT_LONG (error);
@@ -3436,11 +3456,11 @@
 		goto bail;
 
 	oin = ((ocfs_inode *)inode->u.generic_ip);
-	OCFS_ASSERT(IS_VALID_OIN(oin));
 
 	if (oin == ((ocfs_super *)(sb->u.generic_sbp))->oin_root_dir)
 		goto bail;
 	if (oin != NULL) {
+		OCFS_ASSERT(IS_VALID_OIN(oin));
 		ocfs_down_sem (&(oin->main_res), true);
 		status = ocfs_verify_update_oin (oin->osb, oin);
 		if (status < 0)
@@ -3479,7 +3499,7 @@
 	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	if (osb->publ_map == (1 << osb->node_num)) {
-		LOG_TRACE_STR ("Only node alive.  revalidate=true.");
+		LOG_TRACE_STR ("Only node alive. revalidate=true.");
 		ret = 1;
 		goto bail;
 	}
@@ -3489,7 +3509,10 @@
                 ocfs_lock_res *res = NULL;
                 ret = 1;  /* with an oin we cannot fail revalidate */
 		oin = ((ocfs_inode *)inode->u.generic_ip);
-		OCFS_ASSERT(IS_VALID_OIN(oin));
+		if (!oin || !IS_VALID_OIN(oin)) {
+			ret = 0;
+			goto bail;
+		}
 
                 if (ocfs_lookup_sector_node (osb, oin->file_disk_off, &res)==0) {
                         /* if I hold cache lock, no revalidate needed */
@@ -3504,9 +3527,13 @@
 		ocfs_down_sem (&(oin->main_res), true);
 		oin->needs_verification = true;
 		tmpstat = ocfs_verify_update_oin(osb, oin);
-		if (tmpstat < 0)
-			LOG_ERROR_ARGS ("status=%d, name=%*s", tmpstat,
+		if (tmpstat < 0) {
+			if (tmpstat == -ENOENT)
+				ret = 0;
+			else
+				LOG_ERROR_ARGS ("status=%d, name=%*s", tmpstat,
 				       	dentry->d_name.len, dentry->d_name.name);
+		}
 		ocfs_up_sem (&(oin->main_res));
 		goto bail;
 	}

Modified: trunk/ocfs2/Linux/ocfsmount.c
===================================================================
--- trunk/ocfs2/Linux/ocfsmount.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsmount.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -411,6 +411,7 @@
 	__u32 nodemap;
 	__u32 tempmap;
 	int i;
+	bool nm_killed = false;
 
 	LOG_ENTRY_ARGS ("(0x%p)\n", sb);
 
@@ -467,6 +468,7 @@
 		wait_for_completion (&(osb->complete));
 #endif
 		osb->dlm_task = NULL;
+		nm_killed = true;
 	}
 
 	/* create map of all active nodes except self */
@@ -476,23 +478,27 @@
 
 #ifndef USERSPACE_TOOL
 	/* send dismount msg to all */
-	status = ocfs_send_dismount_msg (osb, (__u64)nodemap);
-	if (status < 0)
-		LOG_ERROR_STATUS (status);
+	if (nm_killed && OcfsIpcCtxt.task) {
+		status = ocfs_send_dismount_msg (osb, (__u64)nodemap);
+		if (status < 0)
+			LOG_ERROR_STATUS (status);
+	}
 
 	/* decrement mount count */
-	spin_lock (&mount_cnt_lock);
-	mount_cnt--;
-	if (mount_cnt == 0) {
-		/* Shutdown ocfslsnr */
-		if (OcfsIpcCtxt.task) {
-			LOG_TRACE_STR ("Waiting for ocfslsnr to exit....");
-			send_sig (SIGINT, OcfsIpcCtxt.task, 0);
-			wait_for_completion (&(OcfsIpcCtxt.complete));
-			OcfsIpcCtxt.task = NULL;
+	if (nm_killed) {
+		spin_lock (&mount_cnt_lock);
+		mount_cnt--;
+		if (mount_cnt == 0) {
+			/* Shutdown ocfslsnr */
+			if (OcfsIpcCtxt.task) {
+				LOG_TRACE_STR ("Waiting for ocfslsnr to exit....");
+				send_sig (SIGINT, OcfsIpcCtxt.task, 0);
+				wait_for_completion (&(OcfsIpcCtxt.complete));
+				OcfsIpcCtxt.task = NULL;
+			}
 		}
+		spin_unlock (&mount_cnt_lock);
 	}
-	spin_unlock (&mount_cnt_lock);
 #endif
 
 	ocfs_down_sem (&(OcfsGlobalCtxt.res), true);
@@ -505,8 +511,11 @@
 		AcquiredOSB = false;
 	}
 
-	printk ("ocfs: Unmounting device (%s) on %s (node %d)\n", osb->dev_str,
-		osb->node_cfg_info[osb->node_num]->node_name, osb->node_num);
+	if (nm_killed && osb->node_num != OCFS_INVALID_NODE_NUM)
+		printk ("ocfs: Unmounting device (%s) on %s (node %d)\n",
+		       	osb->dev_str,
+		       	osb->node_cfg_info[osb->node_num]->node_name,
+		       	osb->node_num);
 
 	/* Free all nodecfgs */
 	for (i = 0; i < OCFS_MAXIMUM_NODES; ++i) {

Modified: trunk/ocfs2/Linux/ocfsport.c
===================================================================
--- trunk/ocfs2/Linux/ocfsport.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsport.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,7 +15,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  * 
- * You should have recieved a copy of the GNU General Public
+ * You should have received a copy of the GNU General Public
  * License along with this program; if not, write to the
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 021110-1307, USA.
@@ -223,13 +223,15 @@
 #ifdef HAVE_NPTL
         spin_lock_irq (&current->sighand->siglock);
         tmpsig = current->blocked;
-        siginitsetinv (&current->blocked, SHUTDOWN_SIGS);
+//        siginitsetinv (&current->blocked, SHUTDOWN_SIGS);
+        siginitsetinv (&current->blocked, sigmask(SIGINT));
         recalc_sigpending ();
         spin_unlock_irq (&current->sighand->siglock);
 #else
 	spin_lock_irq (&current->sigmask_lock);
 	tmpsig = current->blocked;
-	siginitsetinv (&current->blocked, SHUTDOWN_SIGS);
+//	siginitsetinv (&current->blocked, SHUTDOWN_SIGS);
+	siginitsetinv (&current->blocked, sigmask(SIGINT));
 	recalc_sigpending (current);
 	spin_unlock_irq (&current->sigmask_lock);
 #endif
@@ -434,12 +436,10 @@
 	if (inode_data_is_oin (inode)) {
 		ocfs_inode *f = ((ocfs_inode *)inode->u.generic_ip);
 
-		if (f == NULL) {
-			LOG_ERROR_STR ("bad inode oin");
+		if (!f || !IS_VALID_OIN(f)) {
 			*off = -1;
 			return false;
 		} else {
-			OCFS_ASSERT(IS_VALID_OIN(f));
 			if (oin != NULL)
 				*oin = f;
 			if (S_ISDIR (inode->i_mode))
@@ -558,7 +558,6 @@
 	
 	if (map->initialized) {
                 spin_lock(&(map->lock));
-		#warning RACE! need to retest map->initialized here!
 		map->capacity = 0;
 		map->count = 0;
 		ocfs_safefree (map->buf);
@@ -582,7 +581,6 @@
 	LOG_ENTRY ();
 
 	OCFS_ASSERT (map != NULL);
-	#warning this locking almost has to be a bug
 	spin_lock(&(map->lock));
 	ret = map->count;
 	spin_unlock(&(map->lock));
@@ -650,10 +648,7 @@
 
 	LOG_ENTRY ();
 
-	if (!map->initialized) {
-		LOG_ERROR_STR ("ExtentMap is not initialized");
-		goto bail;
-	}
+	OCFS_ASSERT(map != NULL && map->initialized == true);
 
 	/* attempt to coalesce this into an existing entry */
 
@@ -779,12 +774,8 @@
 
 	LOG_ENTRY ();
 
-	OCFS_ASSERT (map != NULL);
+	OCFS_ASSERT(map != NULL && map->initialized == true);
 
-	if (!map->initialized) {
-		LOG_ERROR_STATUS (-EFAIL);
-		goto bail;
-	}
 	spin_lock(&(map->lock));
 
 	if ((ret =
@@ -828,7 +819,6 @@
 release_spinlock:
 	spin_unlock(&(map->lock));
 
-bail:
 	LOG_EXIT_ULONG (ret);
 	return ret;
 }				/* ocfs_extent_map_add */
@@ -898,12 +888,8 @@
 
 	LOG_ENTRY ();
 
-	OCFS_ASSERT (map != NULL);
+	OCFS_ASSERT(map != NULL && map->initialized == true);
 
-	if (!map->initialized) {
-		LOG_ERROR_STR ("BUG! Uninitialized ExtentMap!");
-		goto bail;
-	}
 	spin_lock(&(map->lock));
 
 	for (idx = 0; idx < map->count; idx++) {
@@ -925,7 +911,6 @@
 	}
 	spin_unlock(&(map->lock));
 
-bail:
 	*index = idx;
 
 	LOG_EXIT_ULONG (ret);
@@ -944,10 +929,8 @@
 
 	LOG_ENTRY ();
 
-	OCFS_ASSERT (map != NULL);
+	OCFS_ASSERT(map != NULL && map->initialized == true);
 
-	if (!map->initialized)
-		goto bail;
 	spin_lock(&(map->lock));
 	if (runindex >= map->count)
 		goto release_spinlock;
@@ -959,7 +942,6 @@
 
 release_spinlock:
 	spin_unlock(&(map->lock));
-bail:
 
 	LOG_EXIT_ULONG (ret);
 	return ret;

Modified: trunk/ocfs2/Linux/ocfsproc.c
===================================================================
--- trunk/ocfs2/Linux/ocfsproc.c	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Linux/ocfsproc.c	2004-05-14 00:01:35 UTC (rev 6)
@@ -82,7 +82,11 @@
 
 	remove_proc_entry ("ocfs/version", NULL);
 	remove_proc_entry ("ocfs/nodename", NULL);
+	remove_proc_entry ("ocfs/globalctxt", NULL);
+	remove_proc_entry ("ocfs/lockstat", NULL);
+#ifdef OCFS_LINUX_MEM_DEBUG
 	remove_proc_entry ("ocfs/memallocs", NULL);
+#endif
 	remove_proc_entry ("ocfs", NULL);
 
 	LOG_EXIT ();
@@ -535,21 +539,21 @@
 	if (pubmap != ptr)
 		*(ptr - 1) = '\0';
 
-#define PROC_STATS                             \
-  "File open count          : %d.%u\n"         \
-  "Publish map              : %s\n"            \
-  "Number of nodes          : %u\n"            \
-  "Cluster size             : %u\n"            \
-  "Volume size              : %u.%u\n"         \
-  "Dir node size            : %u.%u\n"         \
-  "File node size           : %u.%u\n"         \
-  "Failed Large Allocs      : %u\n"            \
-  "Retry Large Allocs       : %u\n"
+#define PROC_STATS		\
+  "File open count = %d.%u\n"	\
+  "Publish map = %s\n"		\
+  "Cluster size = %u\n"		\
+  "Volume size = %u.%u\n"	\
+  "Failed large allocs = %u\n"	\
+  "Retry large allocs = %u\n"	\
+  "Disk heartbeat = %u\n"	\
+  "Node timeout = %u\n"		\
+  "Max miss count = %u\n"
 
 	len = sprintf (page, PROC_STATS, HILO (osb->file_open_cnt), pubmap,
-		       vol->num_nodes, vol->cluster_size, HILO (vol->size),
-		       HILO (vol->dir_node_size), HILO (vol->file_node_size),
-		       osb->cluster_bitmap.failed, osb->cluster_bitmap.ok_retries);
+		       vol->cluster_size, HILO (vol->size),
+		       osb->cluster_bitmap.failed, osb->cluster_bitmap.ok_retries,
+		       vol->disk_hb, vol->hb_timeo, osb->max_miss_cnt);
 
 	ret = ocfs_proc_calc_metrics (page, start, off, count, eof, len);
 

Modified: trunk/ocfs2/Makefile
===================================================================
--- trunk/ocfs2/Makefile	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/ocfs2/Makefile	2004-05-14 00:01:35 UTC (rev 6)
@@ -15,6 +15,7 @@
 BASE_DEFINES = -DMODULE -DLINUX -D__KERNEL__ 
 DEFINES = $(BASE_DEFINES)
 
+DEFINES += -DRECLAIM_SPACE_ON_TRUNCATE
 DEFINES += -DPARANOID_LOCKS
 DEFINES += -DNO_CACHE
 DEFINES += -DSYSFILE_EXTMAP_FIX

Modified: trunk/vendor/unitedlinux/Makefile
===================================================================
--- trunk/vendor/unitedlinux/Makefile	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/vendor/unitedlinux/Makefile	2004-05-14 00:01:35 UTC (rev 6)
@@ -6,8 +6,6 @@
 	ocfs-2.4.19-64GB-SMP.spec.in		\
 	ocfs-2.4.19-4GB-SMP.spec.in		\
 	ocfs-2.4.19-4GB.spec.in			\
-	ocfs-2.4.21-107.spec.in			\
-	ocfs-2.4.21-111.spec.in			\
-	ocfs-2.4.21-138.spec.in
+	ocfs-2.4.21.spec-generic.in
 
 include $(TOPDIR)/Postamble.make

Deleted: trunk/vendor/unitedlinux/ocfs-2.4.21-107.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.21-107.spec.in	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/vendor/unitedlinux/ocfs-2.4.21-107.spec.in	2004-05-14 00:01:35 UTC (rev 6)
@@ -1,319 +0,0 @@
-#
-# Spec file for OCFS on UL 1.0 SP3
-#
-
-# Macros
-# This one is hardcoded because, well, it belongs there
-%define _prefix /usr
-# Because RPM is dumb
-%define _unpackaged_files_terminate_build 0
-
-# Turn on's and off's (summit and debug not used but added
-# for future proofing)
-%define builddeflt		1
-%define buildsmp		1
-%define buildpsmp		1
-%define buildnuma		0
-%define builditanium2		0
-%define builditanium2smp	0
-
-%ifarch ia64
-%define builddeflt		0
-%define buildsmp		0
-%define buildpsmp		0
-%define builditanium2		1
-%define builditanium2smp	1
-%endif
-
-%ifarch x86_64
-%define buildpsmp		0
-%define buildnuma		1
-%endif
-
-
-
-# This must be changed to the minimum ABI compat kernel version expected
-%define base		2.4.21
-%define sver		107
-%define kver		%{base}-%{sver}
-
-# The minimum -support package required for the kernel bits.
-%define support_ver     @SUPPORT_REQUIRED_VERSION@
-
-Summary: The Oracle Cluster Filesystem.
-Name: ocfs-%{kver}
-Version: @DIST_VERSION@
-Release: @RPM_VERSION@
-Copyright: GPL
-Group: System Environment/Kernel
-Source: ocfs- at DIST_VERSION@.tar.gz
-URL: http://oss.oracle.com/projects/ocfs/
-Distribution: Oracle
-Vendor: Oracle Corporation
-Packager: Joel Becker <joel.becker at oracle.com>
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_deflt = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-
-BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
-
-
-%description
-OCFS is the Oracle Cluster Filesystem.
-This package is compiled for the default kernel.
-
-%if %{builddeflt}
-%package deflt
-Summary: The Oracle Cluster File System for UP systems.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: ocfs = %{version}
-Requires: k_deflt = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description deflt
-The Oracle Cluster Filesystem.
-This package is compiled for the default kernel.
-%endif
-
-
-%if %{buildsmp}
-%package smp
-Summary: The Oracle Cluster File System for SMP systems.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: ocfs = %{version}
-Requires: k_smp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description smp
-The Oracle Cluster Filesystem.
-This package is compiled for symmetric multiprocessor kernels.
-%endif
-
-
-%if %{buildpsmp}
-%package psmp
-Summary: The Oracle Cluster File System for Pentium SMP systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_psmp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description psmp
-The Oracle Cluster Filesystem.
-This package is compiled for Pentium SMP kernels.
-%endif
-
-
-%if %{buildnuma}
-%package numa
-Summary: The Oracle Cluster File System for NUMA systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_numa = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description numa
-The Oracle Cluster Filesystem.
-This package is compiled for NUMA kernels.
-%endif
-
-
-%if %{builditanium2}
-%package itanium2
-Summary: The Oracle Cluster File System for UP Itanium2 systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_itanium2 = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description itanium2
-The Oracle Cluster Filesystem.
-This package is compiled for UP Itanium2 kernels.
-%endif
-
-
-%if %{builditanium2smp}
-%package itanium2-smp
-Summary: The Oracle Cluster File System for SMP Itanium2 systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_itanium2-smp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description itanium2-smp
-The Oracle Cluster Filesystem.
-This package is compiled for Itanium2 SMP kernels.
-%endif
-
-
-%prep
-%setup -n ocfs-%{version}
-
-
-%build
-
-%if %{builddeflt}
-KPATH="/usr/src/linux-%{kver}-include/default"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildsmp}
-KPATH="/usr/src/linux-%{kver}-include/smp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildpsmp}
-KPATH="/usr/src/linux-%{kver}-include/psmp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildnuma}
-KPATH="/usr/src/linux-%{kver}-include/numa"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{builditanium2}
-KPATH="/usr/src/linux-%{kver}-include/itanium2"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{builditanium2smp}
-KPATH="/usr/src/linux-%{kver}-include/itanium2-smp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-
-%if %{builddeflt}
-%post deflt
-depmod -a
-
-%files deflt
-%defattr(-,root,root)
-/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildsmp}
-%post smp
-depmod -a
-
-%files smp
-%defattr(-,root,root)
-/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildpsmp}
-%post psmp
-depmod -a
-
-%files psmp
-%defattr(-,root,root)
-/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildnuma}
-%post numa
-depmod -a
-
-%files numa
-%defattr(-,root,root)
-/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{builditanium2}
-%post itanium2
-depmod -a
-
-%files itanium2
-%defattr(-,root,root)
-/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{builditanium2smp}
-%post itanium2-smp
-depmod -a
-
-%files itanium2-smp
-%defattr(-,root,root)
-/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs
-%endif
-
-
-%changelog
-* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
-- Split out tools
-
-* Thu Nov 28 2003 Joel Becker <joel.becker at oracle.com>
-- Port to OCFS
-
-* Thu Nov 20 2003 Joel Becker <joel.becker at oracle.com>
-- Add x86 and ia64 targets.
-
-* Wed Nov 19 2003 Joel Becker <joel.becker at oracle.com>
-- Make the UL SP3 changes.
-
-* Wed Nov 12 2003 Joel Becker <joel.becker at oracle.com>
-- Start the ASM rename.
-
-* Thu Oct 30 2003 Joel Becker <joel.becker at oracle.com>
-- Created EL3 version
-
-* Mon Jun 23 2003 Joel Becker <joel.becker at oracle.com>
-- Added osm-lib bits
-
-* Fri Jun 20 2003 Joel Becker <joel.becker at oracle.com>
-- Initial RPM
-

Deleted: trunk/vendor/unitedlinux/ocfs-2.4.21-111.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.21-111.spec.in	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/vendor/unitedlinux/ocfs-2.4.21-111.spec.in	2004-05-14 00:01:35 UTC (rev 6)
@@ -1,319 +0,0 @@
-#
-# Spec file for OCFS on UL 1.0 SP3
-#
-
-# Macros
-# This one is hardcoded because, well, it belongs there
-%define _prefix /usr
-# Because RPM is dumb
-%define _unpackaged_files_terminate_build 0
-
-# Turn on's and off's (summit and debug not used but added
-# for future proofing)
-%define builddeflt		1
-%define buildsmp		1
-%define buildpsmp		1
-%define buildnuma		0
-%define builditanium2		0
-%define builditanium2smp	0
-
-%ifarch ia64
-%define builddeflt		0
-%define buildsmp		0
-%define buildpsmp		0
-%define builditanium2		1
-%define builditanium2smp	1
-%endif
-
-%ifarch x86_64
-%define buildpsmp		0
-%define buildnuma		1
-%endif
-
-
-
-# This must be changed to the minimum ABI compat kernel version expected
-%define base		2.4.21
-%define sver		111
-%define kver		%{base}-%{sver}
-
-# The minimum -support package required for the kernel bits.
-%define support_ver     @SUPPORT_REQUIRED_VERSION@
-
-Summary: The Oracle Cluster Filesystem.
-Name: ocfs-%{kver}
-Version: @DIST_VERSION@
-Release: @RPM_VERSION@
-Copyright: GPL
-Group: System Environment/Kernel
-Source: ocfs- at DIST_VERSION@.tar.gz
-URL: http://oss.oracle.com/projects/ocfs/
-Distribution: Oracle
-Vendor: Oracle Corporation
-Packager: Joel Becker <joel.becker at oracle.com>
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_deflt = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-
-BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
-
-
-%description
-OCFS is the Oracle Cluster Filesystem.
-This package is compiled for the default kernel.
-
-%if %{builddeflt}
-%package deflt
-Summary: The Oracle Cluster File System for UP systems.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: ocfs = %{version}
-Requires: k_deflt = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description deflt
-The Oracle Cluster Filesystem.
-This package is compiled for the default kernel.
-%endif
-
-
-%if %{buildsmp}
-%package smp
-Summary: The Oracle Cluster File System for SMP systems.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: ocfs = %{version}
-Requires: k_smp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description smp
-The Oracle Cluster Filesystem.
-This package is compiled for symmetric multiprocessor kernels.
-%endif
-
-
-%if %{buildpsmp}
-%package psmp
-Summary: The Oracle Cluster File System for Pentium SMP systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_psmp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description psmp
-The Oracle Cluster Filesystem.
-This package is compiled for Pentium SMP kernels.
-%endif
-
-
-%if %{buildnuma}
-%package numa
-Summary: The Oracle Cluster File System for NUMA systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_numa = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description numa
-The Oracle Cluster Filesystem.
-This package is compiled for NUMA kernels.
-%endif
-
-
-%if %{builditanium2}
-%package itanium2
-Summary: The Oracle Cluster File System for UP Itanium2 systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_itanium2 = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description itanium2
-The Oracle Cluster Filesystem.
-This package is compiled for UP Itanium2 kernels.
-%endif
-
-
-%if %{builditanium2smp}
-%package itanium2-smp
-Summary: The Oracle Cluster File System for SMP Itanium2 systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_itanium2-smp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description itanium2-smp
-The Oracle Cluster Filesystem.
-This package is compiled for Itanium2 SMP kernels.
-%endif
-
-
-%prep
-%setup -n ocfs-%{version}
-
-
-%build
-
-%if %{builddeflt}
-KPATH="/usr/src/linux-%{kver}-include/default"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildsmp}
-KPATH="/usr/src/linux-%{kver}-include/smp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildpsmp}
-KPATH="/usr/src/linux-%{kver}-include/psmp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildnuma}
-KPATH="/usr/src/linux-%{kver}-include/numa"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{builditanium2}
-KPATH="/usr/src/linux-%{kver}-include/itanium2"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{builditanium2smp}
-KPATH="/usr/src/linux-%{kver}-include/itanium2-smp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-
-%if %{builddeflt}
-%post deflt
-depmod -a
-
-%files deflt
-%defattr(-,root,root)
-/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildsmp}
-%post smp
-depmod -a
-
-%files smp
-%defattr(-,root,root)
-/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildpsmp}
-%post psmp
-depmod -a
-
-%files psmp
-%defattr(-,root,root)
-/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildnuma}
-%post numa
-depmod -a
-
-%files numa
-%defattr(-,root,root)
-/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{builditanium2}
-%post itanium2
-depmod -a
-
-%files itanium2
-%defattr(-,root,root)
-/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{builditanium2smp}
-%post itanium2-smp
-depmod -a
-
-%files itanium2-smp
-%defattr(-,root,root)
-/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs
-%endif
-
-
-%changelog
-* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
-- Split out tools
-
-* Thu Nov 28 2003 Joel Becker <joel.becker at oracle.com>
-- Port to OCFS
-
-* Thu Nov 20 2003 Joel Becker <joel.becker at oracle.com>
-- Add x86 and ia64 targets.
-
-* Wed Nov 19 2003 Joel Becker <joel.becker at oracle.com>
-- Make the UL SP3 changes.
-
-* Wed Nov 12 2003 Joel Becker <joel.becker at oracle.com>
-- Start the ASM rename.
-
-* Thu Oct 30 2003 Joel Becker <joel.becker at oracle.com>
-- Created EL3 version
-
-* Mon Jun 23 2003 Joel Becker <joel.becker at oracle.com>
-- Added osm-lib bits
-
-* Fri Jun 20 2003 Joel Becker <joel.becker at oracle.com>
-- Initial RPM
-

Deleted: trunk/vendor/unitedlinux/ocfs-2.4.21-138.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.21-138.spec.in	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/vendor/unitedlinux/ocfs-2.4.21-138.spec.in	2004-05-14 00:01:35 UTC (rev 6)
@@ -1,319 +0,0 @@
-#
-# Spec file for OCFS on UL 1.0 SP3
-#
-
-# Macros
-# This one is hardcoded because, well, it belongs there
-%define _prefix /usr
-# Because RPM is dumb
-%define _unpackaged_files_terminate_build 0
-
-# Turn on's and off's (summit and debug not used but added
-# for future proofing)
-%define builddeflt		1
-%define buildsmp		1
-%define buildpsmp		1
-%define buildnuma		0
-%define builditanium2		0
-%define builditanium2smp	0
-
-%ifarch ia64
-%define builddeflt		0
-%define buildsmp		0
-%define buildpsmp		0
-%define builditanium2		1
-%define builditanium2smp	1
-%endif
-
-%ifarch x86_64
-%define buildpsmp		0
-%define buildnuma		1
-%endif
-
-
-
-# This must be changed to the minimum ABI compat kernel version expected
-%define base		2.4.21
-%define sver		138
-%define kver		%{base}-%{sver}
-
-# The minimum -support package required for the kernel bits.
-%define support_ver     @SUPPORT_REQUIRED_VERSION@
-
-Summary: The Oracle Cluster Filesystem.
-Name: ocfs-%{kver}
-Version: @DIST_VERSION@
-Release: @RPM_VERSION@
-Copyright: GPL
-Group: System Environment/Kernel
-Source: ocfs- at DIST_VERSION@.tar.gz
-URL: http://oss.oracle.com/projects/ocfs/
-Distribution: Oracle
-Vendor: Oracle Corporation
-Packager: Joel Becker <joel.becker at oracle.com>
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_deflt = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-
-BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
-
-
-%description
-OCFS is the Oracle Cluster Filesystem.
-This package is compiled for the default kernel.
-
-%if %{builddeflt}
-%package deflt
-Summary: The Oracle Cluster File System for UP systems.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: ocfs = %{version}
-Requires: k_deflt = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description deflt
-The Oracle Cluster Filesystem.
-This package is compiled for the default kernel.
-%endif
-
-
-%if %{buildsmp}
-%package smp
-Summary: The Oracle Cluster File System for SMP systems.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: ocfs = %{version}
-Requires: k_smp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description smp
-The Oracle Cluster Filesystem.
-This package is compiled for symmetric multiprocessor kernels.
-%endif
-
-
-%if %{buildpsmp}
-%package psmp
-Summary: The Oracle Cluster File System for Pentium SMP systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_psmp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description psmp
-The Oracle Cluster Filesystem.
-This package is compiled for Pentium SMP kernels.
-%endif
-
-
-%if %{buildnuma}
-%package numa
-Summary: The Oracle Cluster File System for NUMA systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_numa = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description numa
-The Oracle Cluster Filesystem.
-This package is compiled for NUMA kernels.
-%endif
-
-
-%if %{builditanium2}
-%package itanium2
-Summary: The Oracle Cluster File System for UP Itanium2 systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_itanium2 = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description itanium2
-The Oracle Cluster Filesystem.
-This package is compiled for UP Itanium2 kernels.
-%endif
-
-
-%if %{builditanium2smp}
-%package itanium2-smp
-Summary: The Oracle Cluster File System for SMP Itanium2 systems.
-Group: System Environment/Kernel
-Provides: ocfs = %{version}
-AutoReqProv: no
-Requires: k_itanium2-smp = %{kver}
-Requires: ocfs-support >= %{support_ver}
-BuildRequires: kernel-source = %{kver}
-
-%description itanium2-smp
-The Oracle Cluster Filesystem.
-This package is compiled for Itanium2 SMP kernels.
-%endif
-
-
-%prep
-%setup -n ocfs-%{version}
-
-
-%build
-
-%if %{builddeflt}
-KPATH="/usr/src/linux-%{kver}-include/default"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildsmp}
-KPATH="/usr/src/linux-%{kver}-include/smp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildpsmp}
-KPATH="/usr/src/linux-%{kver}-include/psmp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{buildnuma}
-KPATH="/usr/src/linux-%{kver}-include/numa"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{builditanium2}
-KPATH="/usr/src/linux-%{kver}-include/itanium2"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-%if %{builditanium2smp}
-KPATH="/usr/src/linux-%{kver}-include/itanium2-smp"
-%configure --with-kernel="${KPATH}"
-cd ocfs2
-make
-make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs" install 
-make clean
-cd ..
-%endif
-
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-
-%if %{builddeflt}
-%post deflt
-depmod -a
-
-%files deflt
-%defattr(-,root,root)
-/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildsmp}
-%post smp
-depmod -a
-
-%files smp
-%defattr(-,root,root)
-/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildpsmp}
-%post psmp
-depmod -a
-
-%files psmp
-%defattr(-,root,root)
-/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{buildnuma}
-%post numa
-depmod -a
-
-%files numa
-%defattr(-,root,root)
-/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{builditanium2}
-%post itanium2
-depmod -a
-
-%files itanium2
-%defattr(-,root,root)
-/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs
-%endif
-
-
-%if %{builditanium2smp}
-%post itanium2-smp
-depmod -a
-
-%files itanium2-smp
-%defattr(-,root,root)
-/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs
-%endif
-
-
-%changelog
-* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
-- Split out tools
-
-* Thu Nov 28 2003 Joel Becker <joel.becker at oracle.com>
-- Port to OCFS
-
-* Thu Nov 20 2003 Joel Becker <joel.becker at oracle.com>
-- Add x86 and ia64 targets.
-
-* Wed Nov 19 2003 Joel Becker <joel.becker at oracle.com>
-- Make the UL SP3 changes.
-
-* Wed Nov 12 2003 Joel Becker <joel.becker at oracle.com>
-- Start the ASM rename.
-
-* Thu Oct 30 2003 Joel Becker <joel.becker at oracle.com>
-- Created EL3 version
-
-* Mon Jun 23 2003 Joel Becker <joel.becker at oracle.com>
-- Added osm-lib bits
-
-* Fri Jun 20 2003 Joel Becker <joel.becker at oracle.com>
-- Initial RPM
-

Added: trunk/vendor/unitedlinux/ocfs-2.4.21.spec-generic.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.21.spec-generic.in	2004-01-29 07:56:16 UTC (rev 5)
+++ trunk/vendor/unitedlinux/ocfs-2.4.21.spec-generic.in	2004-05-14 00:01:35 UTC (rev 6)
@@ -0,0 +1,319 @@
+#
+# Spec file for OCFS on UL 1.0 SP3
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+# Because RPM is dumb
+%define _unpackaged_files_terminate_build 0
+
+# Turn on's and off's (summit and debug not used but added
+# for future proofing)
+%define builddeflt		1
+%define buildsmp		1
+%define buildpsmp		1
+%define buildnuma		0
+%define builditanium2		0
+%define builditanium2smp	0
+
+%ifarch ia64
+%define builddeflt		0
+%define buildsmp		0
+%define buildpsmp		0
+%define builditanium2		1
+%define builditanium2smp	1
+%endif
+
+%ifarch x86_64
+%define buildpsmp		0
+%define buildnuma		1
+%endif
+
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define base		2.4.21
+%define sver		%{generic}
+%define kver		%{base}-%{sver}
+
+# The minimum -support package required for the kernel bits.
+%define support_ver     @SUPPORT_REQUIRED_VERSION@
+
+Summary: The Oracle Cluster Filesystem.
+Name: ocfs-%{kver}
+Version: @DIST_VERSION@
+Release: @RPM_VERSION@
+Copyright: GPL
+Group: System Environment/Kernel
+Source: ocfs- at DIST_VERSION@.tar.gz
+URL: http://oss.oracle.com/projects/ocfs/
+Distribution: Oracle
+Vendor: Oracle Corporation
+Packager: Joel Becker <joel.becker at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: k_deflt = %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source = %{kver}
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem.
+This package is compiled for the default kernel.
+
+%if %{builddeflt}
+%package deflt
+Summary: The Oracle Cluster File System for UP systems.
+Group: System Environment/Kernel
+AutoReqProv: no
+Provides: ocfs = %{version}
+Requires: k_deflt = %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source = %{kver}
+
+%description deflt
+The Oracle Cluster Filesystem.
+This package is compiled for the default kernel.
+%endif
+
+
+%if %{buildsmp}
+%package smp
+Summary: The Oracle Cluster File System for SMP systems.
+Group: System Environment/Kernel
+AutoReqProv: no
+Provides: ocfs = %{version}
+Requires: k_smp = %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source = %{kver}
+
+%description smp
+The Oracle Cluster Filesystem.
+This package is compiled for symmetric multiprocessor kernels.
+%endif
+
+
+%if %{buildpsmp}
+%package psmp
+Summary: The Oracle Cluster File System for Pentium SMP systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: k_psmp = %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source = %{kver}
+
+%description psmp
+The Oracle Cluster Filesystem.
+This package is compiled for Pentium SMP kernels.
+%endif
+
+
+%if %{buildnuma}
+%package numa
+Summary: The Oracle Cluster File System for NUMA systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: k_numa = %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source = %{kver}
+
+%description numa
+The Oracle Cluster Filesystem.
+This package is compiled for NUMA kernels.
+%endif
+
+
+%if %{builditanium2}
+%package itanium2
+Summary: The Oracle Cluster File System for UP Itanium2 systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: k_itanium2 = %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source = %{kver}
+
+%description itanium2
+The Oracle Cluster Filesystem.
+This package is compiled for UP Itanium2 kernels.
+%endif
+
+
+%if %{builditanium2smp}
+%package itanium2-smp
+Summary: The Oracle Cluster File System for SMP Itanium2 systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: k_itanium2-smp = %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source = %{kver}
+
+%description itanium2-smp
+The Oracle Cluster Filesystem.
+This package is compiled for Itanium2 SMP kernels.
+%endif
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+
+%if %{builddeflt}
+KPATH="/usr/src/linux-%{kver}-include/default"
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs" install 
+make clean
+cd ..
+%endif
+
+%if %{buildsmp}
+KPATH="/usr/src/linux-%{kver}-include/smp"
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs" install 
+make clean
+cd ..
+%endif
+
+%if %{buildpsmp}
+KPATH="/usr/src/linux-%{kver}-include/psmp"
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs" install 
+make clean
+cd ..
+%endif
+
+%if %{buildnuma}
+KPATH="/usr/src/linux-%{kver}-include/numa"
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs" install 
+make clean
+cd ..
+%endif
+
+%if %{builditanium2}
+KPATH="/usr/src/linux-%{kver}-include/itanium2"
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs" install 
+make clean
+cd ..
+%endif
+
+%if %{builditanium2smp}
+KPATH="/usr/src/linux-%{kver}-include/itanium2-smp"
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs" install 
+make clean
+cd ..
+%endif
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%if %{builddeflt}
+%post deflt
+depmod -a
+
+%files deflt
+%defattr(-,root,root)
+/lib/modules/%{kver}-default/kernel/drivers/addon/ocfs
+%endif
+
+
+%if %{buildsmp}
+%post smp
+depmod -a
+
+%files smp
+%defattr(-,root,root)
+/lib/modules/%{kver}-smp/kernel/drivers/addon/ocfs
+%endif
+
+
+%if %{buildpsmp}
+%post psmp
+depmod -a
+
+%files psmp
+%defattr(-,root,root)
+/lib/modules/%{kver}-psmp/kernel/drivers/addon/ocfs
+%endif
+
+
+%if %{buildnuma}
+%post numa
+depmod -a
+
+%files numa
+%defattr(-,root,root)
+/lib/modules/%{kver}-numa/kernel/drivers/addon/ocfs
+%endif
+
+
+%if %{builditanium2}
+%post itanium2
+depmod -a
+
+%files itanium2
+%defattr(-,root,root)
+/lib/modules/%{kver}-itanium2/kernel/drivers/addon/ocfs
+%endif
+
+
+%if %{builditanium2smp}
+%post itanium2-smp
+depmod -a
+
+%files itanium2-smp
+%defattr(-,root,root)
+/lib/modules/%{kver}-itanium2-smp/kernel/drivers/addon/ocfs
+%endif
+
+
+%changelog
+* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
+- Split out tools
+
+* Thu Nov 28 2003 Joel Becker <joel.becker at oracle.com>
+- Port to OCFS
+
+* Thu Nov 20 2003 Joel Becker <joel.becker at oracle.com>
+- Add x86 and ia64 targets.
+
+* Wed Nov 19 2003 Joel Becker <joel.becker at oracle.com>
+- Make the UL SP3 changes.
+
+* Wed Nov 12 2003 Joel Becker <joel.becker at oracle.com>
+- Start the ASM rename.
+
+* Thu Oct 30 2003 Joel Becker <joel.becker at oracle.com>
+- Created EL3 version
+
+* Mon Jun 23 2003 Joel Becker <joel.becker at oracle.com>
+- Added osm-lib bits
+
+* Fri Jun 20 2003 Joel Becker <joel.becker at oracle.com>
+- Initial RPM
+



More information about the Ocfs-commits mailing list