[Ocfs-commits] rev 5 - in trunk: . ocfs2/Common ocfs2/Common/inc ocfs2/Linux tools vendor vendor/redhat vendor/unitedlinux

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Jan 29 07:56:19 CST 2004


Author: manish
Date: 2004-01-29 01:56:16 -0600 (Thu, 29 Jan 2004)
New Revision: 5

Added:
   trunk/tools/README
   trunk/vendor/
   trunk/vendor/Makefile
   trunk/vendor/redhat/
   trunk/vendor/redhat/Makefile
   trunk/vendor/redhat/ocfs-2.4.18-e.spec.in
   trunk/vendor/redhat/ocfs-2.4.21-EL.spec.in
   trunk/vendor/redhat/ocfs-2.4.9-e.spec.in
   trunk/vendor/unitedlinux/
   trunk/vendor/unitedlinux/Makefile
   trunk/vendor/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in
   trunk/vendor/unitedlinux/ocfs-2.4.19-4GB.spec.in
   trunk/vendor/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in
   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/Config.make.in
   trunk/Makefile
   trunk/configure.in
   trunk/ocfs2/Common/inc/ocfsdef.h
   trunk/ocfs2/Common/ocfsgennm.c
   trunk/ocfs2/Common/ocfsgenvote.c
   trunk/ocfs2/Linux/ocfsfile.c
   trunk/ocfs2/Linux/ocfsioctl.c
   trunk/ocfs2/Linux/ocfsmain.c
   trunk/ocfs2/Linux/ocfsmount.c
   trunk/ocfs2/Linux/ocfsport.c
Log:
Sync


Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/Config.make.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -9,6 +9,8 @@
 MICRO_VERSION = @MICRO_VERSION@
 EXTRA_VERSION = @EXTRA_VERSION@
 
+SUPPORT_REQUIRED_VERSION = @SUPPORT_REQUIRED_VERSION@
+
 SHELL = @SHELL@
 
 prefix = @prefix@

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/Makefile	2004-01-29 07:56:16 UTC (rev 5)
@@ -2,7 +2,7 @@
 
 include $(TOPDIR)/Preamble.make
 
-SUBDIRS = ocfs2 tools docs patches redhat unitedlinux
+SUBDIRS = ocfs2 docs patches vendor
 
 DIST_FILES = \
 	COPYING		\
@@ -33,10 +33,10 @@
 
 # REDHAT 
 rhas_srpm: dist
-	rpm -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/redhat/ocfs-2.4.9-e.spec
+	rpm -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/vendor/redhat/ocfs-2.4.9-e.spec
 
 rhasia64_srpm: dist
-	rpm -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/redhat/ocfs-2.4.18-e.spec
+	rpm -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/vendor/redhat/ocfs-2.4.18-e.spec
 
 rhas_rpm: rhas_srpm
 	rpm --rebuild --target i686 "ocfs-2.4.9-e-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
@@ -45,7 +45,7 @@
 	rpm --rebuild --target ia64  "ocfs-2.4.18-e-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
 
 rhel3_srpm: dist
-	rpmbuild -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/redhat/ocfs-2.4.21-EL.spec
+	rpmbuild -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/vendor/redhat/ocfs-2.4.21-EL.spec
 
 rhel3_rpm: rhel3_srpm
 	rpmbuild --rebuild --target i686 "ocfs-2.4.21-EL-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
@@ -60,26 +60,26 @@
 # UNITED LINUX 
 #
 ul64gb_srpm: dist
-	rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/unitedlinux/ocfs-2.4.19-64GB-SMP.spec
+	rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/vendor/unitedlinux/ocfs-2.4.19-64GB-SMP.spec
 
 ul64gb_rpm: ul64gb_srpm
 	rpm --rebuild  --target i586 "ocfs-2.4.19-64GB-SMP-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
 
 
 ul4gbsmp_srpm: dist
-	rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/unitedlinux/ocfs-2.4.19-4GB-SMP.spec
+	rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/vendor/unitedlinux/ocfs-2.4.19-4GB-SMP.spec
 
 ul4gbsmp_rpm: ul4gbsmp_srpm
 	rpm --rebuild --target i586 "ocfs-2.4.19-4GB-SMP-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
 
 ul4gb_srpm: dist
-	rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/unitedlinux/ocfs-2.4.19-4GB.spec
+	rpm -bs --define "_sourcedir `realpath $(TOPDIR)`" --define "_srcrpmdir `realpath $(TOPDIR)`" $(TOPDIR)/vendor/unitedlinux/ocfs-2.4.19-4GB.spec
 
 ul4gb_rpm: ul4gb_srpm
 	rpm --rebuild --target i586 "ocfs-2.4.19-4GB-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"
 
 ul10sp3_%_srpm: dist
-	rpm -bs --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" $(TOPDIR)/unitedlinux/ocfs-2.4.21-$(patsubst ul10sp3_%_srpm,%,$@).spec
+	rpm -bs --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" $(TOPDIR)/vendor/unitedlinux/ocfs-2.4.21-$(patsubst ul10sp3_%_srpm,%,$@).spec
 
 ul10sp3_%_rpm: ul10sp3_%_srpm
 	rpm --rebuild --target i586 "ocfs-2.4.21-$(patsubst ul10sp3_%_rpm,%,$@)-$(DIST_VERSION)-$(RPM_VERSION).src.rpm"

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/configure.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -9,11 +9,14 @@
 MAJOR_VERSION=1
 MINOR_VERSION=0
 MICRO_VERSION=10
-EXTRA_VERSION=PROD2
+EXTRA_VERSION=BETA
 
 # Adjust this only to bump the RPM packaging version
-RPM_VERSION=2
+RPM_VERSION=3
 
+# Required version of ocfs-tools
+SUPPORT_REQUIRED_VERSION=1.1.0
+
 DIST_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
 VERSION=$DIST_VERSION-$EXTRA_VERSION
 
@@ -26,6 +29,8 @@
 AC_SUBST(VERSION)
 AC_SUBST(RPM_VERSION)
 
+AC_SUBST(SUPPORT_REQUIRED_VERSION)
+
 AC_CANONICAL_HOST
 
 OCFS_PROCESSOR=
@@ -61,6 +66,7 @@
 esac
 
 AC_SUBST(OCFS_PROCESSOR)
+
 AC_PROG_CC
 AC_PROG_CPP
 
@@ -77,40 +83,54 @@
   AC_MSG_ERROR(GCC is required)
 fi
 
+AC_MSG_CHECKING(for debugging)
 AC_ARG_ENABLE(debug, [  --enable-debug=[yes/no]         Turn on debugging [default=no]],,enable_debug=no)
 OCFS_DEBUG=
 if test "x$enable_debug" = "xyes"; then
   OCFS_DEBUG=yes
 fi
 AC_SUBST(OCFS_DEBUG)
+AC_MSG_RESULT($enable_debug)
 
+AC_MSG_CHECKING(for aio)
 AC_ARG_ENABLE(aio, [  --enable-aio=[yes/no]         Turn on aio [default=yes]],,enable_aio=yes)
 OCFS_AIO=yes
 if test "x$enable_aio" = "xno"; then
   OCFS_AIO=
 fi
 AC_SUBST(OCFS_AIO)
+AC_MSG_RESULT($enable_aio)
 
+AC_MSG_CHECKING(for memory debugging)
 AC_ARG_ENABLE(memdebug, [  --enable-memdebug=[yes/no]     Turn on memory debugging [default=no]],,enable_memdebug=no)
 OCFS_MEMDEBUG=
 if test "x$enable_memdebug" = "xyes"; then
   OCFS_MEMDEBUG=yes
 fi
 AC_SUBST(OCFS_MEMDEBUG)
+AC_MSG_RESULT($enable_memdebug)
 
+AC_MSG_CHECKING(for tracing)
 AC_ARG_ENABLE(trace, [  --enable-trace=[yes/no]         Turn on tracing [default=yes]],,enable_trace=yes)
 OCFS_TRACE=
 if test "x$enable_trace" = "xyes"; then
   OCFS_TRACE=yes
 fi
 AC_SUBST(OCFS_TRACE)
+AC_MSG_RESULT($enable_trace)
 
-AC_ARG_ENABLE(largeio, [  --enable-largeio=[yes/no]         Turn on largeio [default=yes]],,enable_largeio=yes) 
+AC_MSG_CHECKING(for large ios)
+AC_ARG_ENABLE(largeio, [  --enable-largeio=[yes/no/auto]    Turn on largeio [default=auto]],,enable_largeio=auto) 
 OCFS_LARGEIO=yes
 if test "x$enable_largeio" = "xno"; then
   OCFS_LARGEIO=
+elif test "x$enable_largeio" = "xauto"; then
+  if test "$OCFS_PROCESSOR" = "ia64"; then
+    OCFS_LARGEIO=
+  fi
 fi
 AC_SUBST(OCFS_LARGEIO)
+AC_MSG_RESULT($enable_largeio)
 
 AC_MSG_CHECKING(for directory with kernel source)
 AC_ARG_WITH(kernel, [  --with-kernel=dir       Path to the kernel source tree [/usr/src/linux]], kerneldir="$withval",
@@ -272,41 +292,14 @@
 GCCINC=$gccdir
 AC_SUBST(GCCINC)
 
-TOOLDIRS="cdslctl libocfs format debugocfs fsck bugfix load_ocfs ocfs_uid_gen"
-LIBDEBUGOCFS=
-
-AC_ARG_ENABLE(ocfstool, [  --enable-ocfstool=[yes/no]       Build GUI frontend [default=yes]],,enable_ocfstool=yes)
-
-if test "x$enable_ocfstool" = "xyes"; then
-  AM_PATH_GTK(1.2.8, have_gtk=yes, have_gtk=no)
-
-  if test "x$have_gtk" = "xyes"; then
-    TOOLDIRS="$TOOLDIRS ocfstool"
-    LIBDEBUGOCFS="libdebugocfs.a"
-  else
-    AC_MSG_WARN([GTK+ not found, ocfstool will not be built])
-  fi
-fi
-
-AC_SUBST(TOOLDIRS)
-AC_SUBST(LIBDEBUGOCFS)
-
 AC_OUTPUT([Config.make
-tools/cdslctl/cdslctl.1
-tools/debugocfs/debugocfs.1
-tools/format/mkfs.ocfs.1
-tools/format/resizeocfs.1
-tools/fsck/fsck.ocfs.1
-tools/load_ocfs/load_ocfs.1
-tools/ocfs_uid_gen/ocfs_uid_gen.1
-tools/ocfstool/ocfstool.1
-redhat/ocfs-2.4.9-e.spec
-redhat/ocfs-2.4.18-e.spec
-redhat/ocfs-2.4.21-EL.spec
-unitedlinux/ocfs-2.4.19-64GB-SMP.spec
-unitedlinux/ocfs-2.4.19-4GB-SMP.spec
-unitedlinux/ocfs-2.4.19-4GB.spec
-unitedlinux/ocfs-2.4.21-107.spec
-unitedlinux/ocfs-2.4.21-111.spec
-unitedlinux/ocfs-2.4.21-138.spec
+vendor/redhat/ocfs-2.4.9-e.spec
+vendor/redhat/ocfs-2.4.18-e.spec
+vendor/redhat/ocfs-2.4.21-EL.spec
+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
 ])

Modified: trunk/ocfs2/Common/inc/ocfsdef.h
===================================================================
--- trunk/ocfs2/Common/inc/ocfsdef.h	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Common/inc/ocfsdef.h	2004-01-29 07:56:16 UTC (rev 5)
@@ -50,6 +50,8 @@
 
 #define  IS_VALID_OIN(_oin)	((_oin)->obj_id.type == OCFS_TYPE_OIN)
 
+#define  IS_VALID_OSB(_osb)	((_osb)->obj_id.type == OCFS_TYPE_OSB)
+
 #define  OCFS_GET_EXTENT(vbo, extent, k)                            \
               do {                                                  \
                 for ((k) = 0; (k) < OCFS_MAX_DATA_EXTENTS; (k)++) { \

Modified: trunk/ocfs2/Common/ocfsgennm.c
===================================================================
--- trunk/ocfs2/Common/ocfsgennm.c	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Common/ocfsgennm.c	2004-01-29 07:56:16 UTC (rev 5)
@@ -46,8 +46,7 @@
 
 	LOG_ENTRY ();
 
-	if (!IS_VALID_OIN(oin))
-		BUG();
+	OCFS_ASSERT(IS_VALID_OIN(oin));
 
 	if (oin->oin_flags & OCFS_OIN_DIRECTORY)
 		goto bail;
@@ -527,10 +526,7 @@
 	if (publish->vote_type & FLAG_FILE_UPDATE_OIN) {
 		oin = lockres->oin;
 		if (oin) {
-			if (!IS_VALID_OIN(oin))
-				BUG();
-			if (!(oin->oin_flags & OCFS_INITIALIZED_MAIN_RESOURCE))
-				BUG();
+			OCFS_ASSERT(IS_VALID_OIN(oin));
 			ocfs_down_sem (&(oin->main_res), true);
 			oin->needs_verification = true;
 			tmpstat = ocfs_verify_update_oin(osb, oin);

Modified: trunk/ocfs2/Common/ocfsgenvote.c
===================================================================
--- trunk/ocfs2/Common/ocfsgenvote.c	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Common/ocfsgenvote.c	2004-01-29 07:56:16 UTC (rev 5)
@@ -270,8 +270,12 @@
 	status = ocfs_find_update_res (osb, req_master->lock_id, &lockres, NULL, NULL, 
 				       (OCFS_NM_HEARTBEAT_TIME));
 	if (status < 0) {
-		if (status == -ETIMEDOUT)
+		if (status == -ETIMEDOUT) {
+			LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_RETRY\n",
+				       	HILO (req_master->lock_seq_num));
+			ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_UPDATE_RETRY, false);
 			goto finally;
+		}
 		if (req_master->flags & FLAG_FILE_UPDATE_OIN) {
 			status = ocfs_process_update_inode_request (osb,
 					req_master->lock_id, lockres,
@@ -289,28 +293,15 @@
 		goto finally;
 	}
 
-//	ocfs_acquire_lockres (lockres);
 	status = ocfs_acquire_lockres_ex (lockres, (OCFS_NM_HEARTBEAT_TIME/2));
 	if (status < 0) {
-		LOG_TRACE_ARGS ("Timedout locking lockres for id: %u.%u\n",
-			       	HILO (lockres->sector_num));
+		LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_RETRY\n",
+			       	HILO (req_master->lock_seq_num));
+		ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_UPDATE_RETRY, false);
 		goto finally;
 	} else
 		lockres_acq = true;
 
-#if 0
-	if (lockres->vote_state & LOCK_STATE_INIT) {
-		status = ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_NODE, false);
-		goto finally;
-	}
-
-	if ((lockres->master_node_num == osb->node_num) &&
-	    (dlm_msg->src_node == osb->node_num)) {
-		status = ocfs_send_vote_reply (osb, dlm_msg, FLAG_VOTE_NODE, false);
-		goto finally;
-	}
-#endif
-
 	flags = req_master->flags;
 	node_num = dlm_msg->src_node;
 
@@ -374,10 +365,7 @@
 	if (flags & FLAG_FILE_UPDATE_OIN) {
 		if (lockres->oin != NULL) {
 			oin = lockres->oin;
-			if (!IS_VALID_OIN(oin))
-				BUG();
-			if (!(oin->oin_flags & OCFS_INITIALIZED_MAIN_RESOURCE))
-				BUG();
+			OCFS_ASSERT(IS_VALID_OIN(oin));
 			ocfs_down_sem (&(oin->main_res), true);
 			oin->needs_verification = true;
 			tmpstat = ocfs_verify_update_oin(osb, oin);
@@ -406,7 +394,6 @@
 				__u64 tmp = req_master->lock_id;
 				osb->needs_flush = true;
 				ocfs_trans_in_progress(osb);
-//				if (osb->trans_in_progress == true) {
 				if (lockres->lock_type != OCFS_DLM_NO_LOCK) {
 					LOG_TRACE_ARGS ("ocfs: rqrep seq=%u.%u, vote=VOTE_RETRY\n",
 						       	HILO (req_master->lock_seq_num));

Modified: trunk/ocfs2/Linux/ocfsfile.c
===================================================================
--- trunk/ocfs2/Linux/ocfsfile.c	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Linux/ocfsfile.c	2004-01-29 07:56:16 UTC (rev 5)
@@ -57,6 +57,7 @@
 	}
 	inode = dentry->d_inode;
 	osb = ((ocfs_super *)(dir->i_sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	if (inode_data_is_oin (inode)) {
 		OIN = ((ocfs_inode *)inode->u.generic_ip);
@@ -64,6 +65,7 @@
 			LOG_ERROR_STATUS (status = -EFAIL);
 			goto finally;
 		}
+		OCFS_ASSERT(IS_VALID_OIN(OIN));
 
 		if (OIN->open_hndl_cnt > 0) {
 			LOG_TRACE_STR ("Cannot remove an open file");
@@ -108,21 +110,16 @@
 		if (!ocfs_linux_get_dir_entry_offset (osb, &fileOff, parentOff,
 						      &(dentry->d_name), NULL)) {
 			LOG_ERROR_STATUS (status = -ENOENT);
-			goto finally;
 		}
 	} else {
 		if (!ocfs_linux_get_inode_offset (inode, &fileOff, NULL)) {
 			LOG_ERROR_STATUS (status = -ENOENT);
-			goto finally;
 		}
 	}
 
-	status = -EFAIL;
 	if (fileOff != -1)
-		status =
-		    ocfs_create_modify_file (osb, parentOff, NULL, NULL, 0,
-				      &fileOff, FLAG_FILE_DELETE, NULL, NULL);
-
+		status = ocfs_create_modify_file (osb, parentOff, NULL, NULL, 0,
+				  &fileOff, FLAG_FILE_DELETE, NULL, NULL);
 	if (status < 0) {
 		if (status != -ENOTEMPTY && status != -EPERM &&
 		    status != -EBUSY && status != -EINTR)
@@ -185,15 +182,28 @@
 	}
 
 	osb = ((ocfs_super *)(old_dir->i_sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	/* old parent dir offset */
-	ocfs_linux_get_inode_offset (old_dir, &oldDirOff, NULL);
+	if (!ocfs_linux_get_inode_offset (old_dir, &oldDirOff, NULL)) {
+		LOG_ERROR_STATUS (status = -ENOENT);
+		goto finally;
+	}
 
 	/* old file offset */
-	ocfs_linux_get_inode_offset (old_dentry->d_inode, &oldOffset, &oldOIN);
+	if (!ocfs_linux_get_inode_offset (old_dentry->d_inode, &oldOffset,
+					  &oldOIN)) {
+		LOG_ERROR_STATUS (status = -ENOENT);
+		goto finally;
+	}
+
 	if (S_ISDIR (old_dentry->d_inode->i_mode)) {
 		/* overwrite oldOffset to get ptr to OCFS_FILE_ENTRY not DIR_NODE */
-		ocfs_linux_get_dir_entry_offset (osb, &oldOffset, oldDirOff, &(old_dentry->d_name), NULL);
+		if (!ocfs_linux_get_dir_entry_offset (osb, &oldOffset,
+				      oldDirOff, &(old_dentry->d_name), NULL)) {
+			LOG_ERROR_STATUS (status = -ENOENT);
+			goto finally;
+		}
 	}
 
 	if (oldOIN) {
@@ -215,6 +225,7 @@
 	    inode_data_is_oin (new_dentry->d_inode)) {
 		/* overwriting an existing inode */
 		newOIN = ((ocfs_inode *)new_dentry->d_inode->u.generic_ip);
+		OCFS_ASSERT(IS_VALID_OIN(newOIN));
 
 		if (!(newOIN->oin_flags & OCFS_OIN_IN_TEARDOWN) &&
 		    !(newOIN->oin_flags & OCFS_OIN_DELETE_ON_CLOSE)) {

Modified: trunk/ocfs2/Linux/ocfsioctl.c
===================================================================
--- trunk/ocfs2/Linux/ocfsioctl.c	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Linux/ocfsioctl.c	2004-01-29 07:56:16 UTC (rev 5)
@@ -69,6 +69,10 @@
 		    break;
 	    case OCFS_IOC_CDSL_MODIFY:
 		    osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
+		    if (!IS_VALID_OSB(osb)) {
+			    ret = -EINVAL;
+			    goto exit_ioctl;
+		    }
 		    ret =
 			copy_from_user (cdsl, (void *) arg,
 					sizeof (ocfs_cdsl));

Modified: trunk/ocfs2/Linux/ocfsmain.c
===================================================================
--- trunk/ocfs2/Linux/ocfsmain.c	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Linux/ocfsmain.c	2004-01-29 07:56:16 UTC (rev 5)
@@ -309,6 +309,7 @@
 		LOG_ERROR_STR ("Error mounting volume");
 		goto read_super_error;
 	}
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 #ifdef ALLOW_CACHE_MOUNT
 	osb->cache_fs = c;		/* set caching type */
@@ -703,8 +704,10 @@
 		    break;
 	}
 	oin = NULL;		/* set it back to our current OIN if we have one */
-	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));
+	}
 	ocfs_populate_inode (inode, args->entry, mode, oin);
 	ret = 1;
       bail:
@@ -727,6 +730,8 @@
 
 	sb = inode->i_sb;
 	osb = ((ocfs_super *)(sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
+
 	offset = S_ISDIR (mode) ? fe->extents[0].disk_off : fe->this_sector;
 
 	inode->i_dev = sb->s_dev;
@@ -794,6 +799,8 @@
 	}
 	sb = inode->i_sb;
 	osb = ((ocfs_super *)(sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
+
 	if (inode->i_ino == OCFS_ROOT_INODE_NUMBER) {
 		inode->i_mode = S_IFDIR | osb->vol_layout.prot_bits;
 		inode->i_blksize = (__u32) osb->vol_layout.cluster_size;
@@ -882,11 +889,14 @@
 	struct inode *inode = NULL;
 	struct super_block *sb = dir->i_sb;
 	struct dentry *ret;
-	ocfs_super *osb = ((ocfs_super *)(sb->u.generic_sbp));
+	ocfs_super *osb = NULL;
 
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, '%*s')\n", dir, dentry,
                         dentry->d_name.len, dentry->d_name.name);
 
+	osb = ((ocfs_super *)(sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
+
 	atomic_inc (&dir->i_count);
 
 	if (dentry->d_name.len > OCFS_MAX_FILENAME_LENGTH) {
@@ -953,6 +963,8 @@
         LOG_ENTRY_ARGS ("(0x%p, 0x%p)\n", sb, buf);
 
         osb = ((ocfs_super *)(sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
+
         numbits = osb->cluster_bitmap.size;
         
         status = ocfs_read_force_disk (osb, lockbuf, OCFS_SECTOR_SIZE, (__u64)OCFS_BITMAP_LOCK_OFFSET);
@@ -1051,6 +1063,7 @@
 		goto bail;
 	}
 	osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	if ((iblock << 9) > PATH_MAX + 1) {
 		LOG_ERROR_ARGS ("file offset > PATH_MAX: %u.%u", iblock << 9);
@@ -1127,7 +1140,10 @@
 	}
 
 	oin = ((ocfs_inode *)inode->u.generic_ip);
+	OCFS_ASSERT(IS_VALID_OIN(oin));
+
 	osb = (ocfs_super *) oin->osb;
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	vbo = (__s64) iblock << inode->i_sb->s_blocksize_bits;
 
@@ -1186,8 +1202,12 @@
 		err = -1;
 		goto bail;
 	}
+
 	oin = ((ocfs_inode *)inode->u.generic_ip);
+	OCFS_ASSERT(IS_VALID_OIN(oin));
+
 	osb = (ocfs_super *) oin->osb;
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	vbo = (__s64) iblock << inode->i_sb->s_blocksize_bits;
 	len = 1;
@@ -1200,11 +1220,15 @@
 	}
 
       bail:
-	if (ioRuns != NULL) {
-		ocfs_safefree (ioRuns);
+	if (err == 0) {
+		*oblock = lbo >> inode->i_sb->s_blocksize_bits;
+		if (*oblock == 0) {
+			LOG_ERROR_ARGS("inode=0x%p, iblk=%d", inode, iblock);
+			err = -EIO;
+		}
 	}
+	ocfs_safefree (ioRuns);
 	LOG_EXIT_LONG (err);
-	*oblock = lbo >> inode->i_sb->s_blocksize_bits;
 	return err;
 }				/* ocfs_get_block2 */
 
@@ -1240,7 +1264,10 @@
 		goto bail;
 	}
 	oin = ((ocfs_inode *)inode->u.generic_ip);
+	OCFS_ASSERT(IS_VALID_OIN(oin));
+
 	osb = (ocfs_super *) oin->osb;
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	lockres = oin->lock_res;
 	if (lockres == NULL) {
@@ -1404,7 +1431,10 @@
 		goto bail;
 	}
 	oin = ((ocfs_inode *)inode->u.generic_ip);
+	OCFS_ASSERT(IS_VALID_OIN(oin));
+
 	osb = (ocfs_super *) oin->osb;
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	if (filp->f_flags & O_DIRECT) {
 		/* anything special for o_direct? */
@@ -1675,6 +1705,8 @@
                         nbhs = max_sectors;
 #ifdef KERNEL_NO_F_IOBUF
                 err = alloc_kiovec_sz (1, &iobuf, &nbhs);
+                if (err)
+                        goto out;
 #else
 		if (test_and_set_bit(0, &filp->f_iobuf_lock)) {
                 /*
@@ -1688,10 +1720,6 @@
         	 }
 #endif
                 inuse = true;
-#ifdef KERNEL_NO_F_IOBUF
-                if (err)
-                        goto out;
-#endif
                 totalioblocks = 0;
                 while (size > 0) {
                         if (large_io) {
@@ -1974,8 +2002,7 @@
 	OCFS_ASSERT (dir->i_sb);
 	OCFS_ASSERT (newofile);
 	osb = ((ocfs_super *)(dir->i_sb->u.generic_sbp));
-	OCFS_ASSERT (osb);
-	OCFS_ASSERT (osb->obj_id.type == OCFS_TYPE_OSB);
+	OCFS_ASSERT (IS_VALID_OSB(osb));
 
 	if (!ocfs_linux_get_inode_offset (dir, &ParentDirNodeOffset, &ParentOin)) {
 		LOG_ERROR_STATUS (status = -ENOENT);
@@ -2007,11 +2034,12 @@
 		 * inode, and therefore we are given the oin too */
 		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) {
- 
+			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);
@@ -2211,6 +2239,7 @@
                                 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);
@@ -2240,7 +2269,9 @@
 		if (oin->inode == inode && OIN_NEEDS_VERIFICATION(oin)) {
 			status = ocfs_verify_update_oin (osb, oin);
 			if (status < 0) {
-				LOG_ERROR_STATUS (status);
+				LOG_ERROR_ARGS ("status=%d, name=%*s", status,
+					       	dentry->d_name.len,
+					       	dentry->d_name.name);
 				goto leave;
 			}
 		}
@@ -2516,6 +2547,7 @@
 	__u64 off;
 	ocfs_file_entry *fe;
 	struct inode *inode;
+	ocfs_super *osb = NULL;
 
 	LOG_ENTRY_ARGS ("(0x%p, 0x%p, 0x%p, old='%*s' new='%*s')\n", old_dentry, dir, dentry,
                         old_dentry->d_name.len, old_dentry->d_name.name,
@@ -2532,7 +2564,10 @@
 		goto bail;
 	}
 
-	status = ocfs_read_file_entry (((ocfs_super *)(inode->i_sb->u.generic_sbp)), fe, off);
+	osb = (ocfs_super *)(inode->i_sb->u.generic_sbp);
+	OCFS_ASSERT(IS_VALID_OSB(osb));
+
+	status = ocfs_read_file_entry (osb, fe, off);
 	if (status < 0) {
 		LOG_ERROR_STATUS (status);
 		goto bail;
@@ -2543,10 +2578,7 @@
 	}
 
       bail:
-	if (fe) {
-		ocfs_release_file_entry (fe);
-	}
-
+	ocfs_release_file_entry (fe);
 	LOG_EXIT_LONG (0);
 	return -EPERM;
 }				/* ocfs_link */
@@ -2647,10 +2679,12 @@
 			goto bail;
 		}
 
-		if (oin)
+		if (oin) {
+			OCFS_ASSERT(IS_VALID_OIN(oin));
 			ocfs_release_oin (oin, true);
-		else {
+		} else {
                 	osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
+			OCFS_ASSERT(IS_VALID_OSB(osb));
                 	if (osb && ocfs_linux_get_inode_offset (inode, &off, NULL)) {
                         	tmpstat = ocfs_lookup_sector_node (osb, off, &lockres);
                         	if (tmpstat >= 0 && lockres) {
@@ -2880,6 +2914,7 @@
 
         /* file */
         osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
         oin = NULL;
                 
         if (ofile == NULL)
@@ -3037,6 +3072,7 @@
 		goto bail;
 	}
 	osb = ((ocfs_super *)(sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	if (!ocfs_linux_get_inode_offset (inode, &rootOff, &oin)) {
 		LOG_TRACE_STR ("Inode has no OIN");
@@ -3131,14 +3167,15 @@
  */
 static void ocfs_put_inode (struct inode *inode)
 {
+	ocfs_inode *oin;
+
 	LOG_ENTRY_ARGS ("(0x%p)\n", inode);
-	LOG_TRACE_ARGS ("put_inode: count=%d\n", inode->i_count);
+
 	if (inode_data_is_oin(inode) && (atomic_read (&inode->i_count) == 1) ) {
-	     ocfs_inode *oin;
-	     oin = ((ocfs_inode *)inode->u.generic_ip);
+		oin = ((ocfs_inode *)inode->u.generic_ip);
+		OCFS_ASSERT(IS_VALID_OIN(oin));
 		ocfs_extent_map_destroy (&oin->map);
 		ocfs_extent_map_init (&oin->map);
-// 	     ocfs_delete_all_extent_maps (oin);
 	} 
 	LOG_EXIT ();
 	return;
@@ -3150,70 +3187,64 @@
  */
 static void ocfs_clear_inode (struct inode *inode)
 {
+	ocfs_inode *oin = NULL;
+	ocfs_super *osb = NULL;
+	ocfs_file *ofile = NULL;
+	struct list_head *iter;
+	struct list_head *temp_iter;
+	__u64 fileOff;
+	ocfs_lock_res *lockres = NULL;
+
 	LOG_ENTRY_ARGS ("(ino=0x%p)\n", inode);
 
-	if (inode) {
-		if (inode_data_is_oin (inode)) {
-			ocfs_inode *oin;
-			ocfs_super *osb;
-			ocfs_file *ofile;
-			struct list_head *iter;
-			struct list_head *temp_iter;
+	if (!inode)
+		goto bail;
 
-			LOG_TRACE_STR ("inode with oin : clear inode");
+	if (inode_data_is_oin (inode)) {
+		oin = ((ocfs_inode *)inode->u.generic_ip);
+		OCFS_ASSERT(IS_VALID_OIN(oin));
 
-			oin = ((ocfs_inode *)inode->u.generic_ip);
-			osb = (ocfs_super *) oin->osb;
-			if (oin == osb->oin_root_dir) {
-				LOG_TRACE_STR
-				    ("this is the root inode, doing cleanup now!");
-				fsync_no_super (inode->i_sb->s_dev);
-				LOG_TRACE_STR ("syncing past root inode");
-				LOG_TRACE_STR ("calling dismount");
-				ocfs_dismount_volume (inode->i_sb);
-				goto bail;
-			}
+		/* mind you, the osb could have been freed because of the */
+		/* way vfs clears the inodes on umount */
+		osb = (ocfs_super *) oin->osb;
 
-			list_for_each_safe (iter, temp_iter, &(oin->next_ofile)) {
-				ofile =
-				    list_entry (iter, ocfs_file, next_ofile);
-				ocfs_release_ofile (ofile);
-			}
+		if (oin == osb->oin_root_dir) {
+			fsync_no_super (inode->i_sb->s_dev);
+			ocfs_dismount_volume (inode->i_sb);
+			goto bail;
+		}
 
-			ocfs_extent_map_destroy (&oin->map);
-			ocfs_extent_map_init (&oin->map);
-//			ocfs_delete_all_extent_maps (oin);
+		list_for_each_safe (iter, temp_iter, &(oin->next_ofile)) {
+			ofile = list_entry (iter, ocfs_file, next_ofile);
+			ocfs_release_ofile (ofile);
+		}
 
-			ocfs_release_cached_oin (osb, oin);
-			ocfs_release_oin (oin, true);
-			oin = NULL;
-			LOG_TRACE_STR ("yeah! done with deallocs!");
-		} else {
-			__u64 fileOff;
-			ocfs_lock_res *lockres = NULL;
-			ocfs_super *osb;
+		ocfs_extent_map_destroy (&oin->map);
+		ocfs_extent_map_init (&oin->map);
 
-			osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
+		ocfs_release_cached_oin (osb, oin);
+		ocfs_release_oin (oin, true);
+		oin = NULL;
+	} else {
+		osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
 
-			if (ocfs_linux_get_inode_offset (inode, &fileOff, NULL)) {
-				if (!ocfs_lookup_sector_node (osb, fileOff, &lockres)) {
-					if (lockres) {
-						if (lockres->oin) {
-							ocfs_put_lockres (lockres->oin->lock_res);
-							lockres->oin->lock_res = NULL;
-							lockres->oin = NULL;
-						}
-						ocfs_remove_sector_node (osb, lockres);
-						ocfs_put_lockres(lockres);
-					} else
-						LOG_TRACE_STR ("lockres in hash is null");
-				} else {
-					LOG_TRACE_STR
-					    ("hashtable has already been destroyed.  skipping.");
-				}
+		if (ocfs_linux_get_inode_offset (inode, &fileOff, NULL)) {
+			if (!ocfs_lookup_sector_node (osb, fileOff, &lockres)) {
+				if (lockres) {
+					if (lockres->oin) {
+						ocfs_put_lockres (lockres->oin->lock_res);
+						lockres->oin->lock_res = NULL;
+						lockres->oin = NULL;
+					}
+					ocfs_remove_sector_node (osb, lockres);
+					ocfs_put_lockres(lockres);
+				} else
+					LOG_TRACE_STR ("lockres in hash is null");
 			} else {
-				LOG_TRACE_STR ("Could not find offset");
+				LOG_TRACE_STR ("hashtable has already been destroyed.  skipping.");
 			}
+		} else {
+			LOG_TRACE_STR ("Could not find offset");
 		}
 	}
       bail:
@@ -3258,6 +3289,7 @@
                         dentry->d_name.len, dentry->d_name.name);
 
 	osb = ((ocfs_super *)(inode->i_sb->u.generic_sbp));
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	if (!dentry->d_parent || !dentry->d_parent->d_inode) {
 		LOG_ERROR_STR ("bad inode or root inode");
@@ -3356,18 +3388,20 @@
 	}
 
 	/* if directory, put FILE_ENTRY ptr into fileOff */
-	if (S_ISDIR (inode->i_mode))
-		ocfs_linux_get_dir_entry_offset (osb, &fileOff, parentOff, &(dentry->d_name), &fe);
+	if (S_ISDIR (inode->i_mode)) {
+		if (!ocfs_linux_get_dir_entry_offset (osb, &fileOff, parentOff,
+						      &(dentry->d_name), &fe)) {
+			LOG_ERROR_STATUS (status = -ENOENT);
+			goto bail;
+		}
+	}
 
-	status = -EFAIL;
-	if (fileOff != -1)
-		status =
-		    ocfs_create_modify_file (osb, parentOff, NULL, NULL, newsize,
-				      &fileOff, FLAG_FILE_UPDATE, NULL, attr);
+	status = ocfs_create_modify_file (osb, parentOff, NULL, NULL, newsize,
+					  &fileOff, FLAG_FILE_UPDATE, NULL, attr);
 	if (status < 0) {
 		if (status != -EINTR) {
-		LOG_ERROR_STATUS (status);
-		error = -EIO;
+			LOG_ERROR_STATUS (status);
+			error = -EIO;
 		} else
 			error = status;
 		goto bail;
@@ -3400,7 +3434,10 @@
 	inode = dentry->d_inode;
 	if (inode == NULL || !inode_data_is_oin (inode))
 		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) {
@@ -3432,13 +3469,15 @@
 	ocfs_find_inode_args args;
         struct qstr q;
 	
-        LOG_ENTRY_ARGS ("(0x%p, %d, '%*s')\n", dentry, flags,
-                        dentry->d_name.len, dentry->d_name.name);
+	LOG_ENTRY_ARGS ("(0x%p, %d, '%*s')\n", dentry, flags,
+			dentry->d_name.len, dentry->d_name.name);
 
 	if ((inode = dentry->d_inode) == NULL ||
 	    (osb = (ocfs_super *)(inode->i_sb->u.generic_sbp)) == NULL)
                 goto bail;
 
+	OCFS_ASSERT(IS_VALID_OSB(osb));
+
 	if (osb->publ_map == (1 << osb->node_num)) {
 		LOG_TRACE_STR ("Only node alive.  revalidate=true.");
 		ret = 1;
@@ -3450,6 +3489,7 @@
                 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 (ocfs_lookup_sector_node (osb, oin->file_disk_off, &res)==0) {
                         /* if I hold cache lock, no revalidate needed */
@@ -3460,17 +3500,17 @@
                         } else
 				ocfs_put_lockres (res);
                 }
-                /* hit the disk */
-                /* TODO: optimize */
+
 		ocfs_down_sem (&(oin->main_res), true);
 		oin->needs_verification = true;
 		tmpstat = ocfs_verify_update_oin(osb, oin);
 		if (tmpstat < 0)
-			LOG_ERROR_STATUS (tmpstat);
+			LOG_ERROR_ARGS ("status=%d, name=%*s", tmpstat,
+				       	dentry->d_name.len, dentry->d_name.name);
 		ocfs_up_sem (&(oin->main_res));
 		goto bail;
-	} 
-        
+	}
+
         /* no oin for this dentry, must hit the disk */
         /* TODO: optimize */
         if (S_ISDIR (inode->i_mode)) {
@@ -3505,8 +3545,7 @@
         }
         
 bail:
-        if (fe)
-                ocfs_release_file_entry (fe);
+	ocfs_release_file_entry (fe);
 	LOG_EXIT_LONG (ret);
 	return ret;
 }				/* ocfs_dentry_revalidate */
@@ -3673,22 +3712,22 @@
  */
 int ocfs_initialize_mem_lists (void)
 {
-	OcfsGlobalCtxt.oin_cache = kmem_cache_create ("oin_cache",
+	OcfsGlobalCtxt.oin_cache = kmem_cache_create ("ocfs_oin",
 		sizeof (ocfs_inode) + OCFS_POINTER_SIZE, 0, SLAB_NO_REAP | SLAB_HWCACHE_ALIGN,
 		NULL, NULL);
 
-	OcfsGlobalCtxt.ofile_cache = kmem_cache_create ("ofile_cache",
+	OcfsGlobalCtxt.ofile_cache = kmem_cache_create ("ocfs_ofile",
 		sizeof (ocfs_file) + OCFS_POINTER_SIZE, 0, SLAB_NO_REAP | SLAB_HWCACHE_ALIGN,
 		NULL, NULL);
 
-	OcfsGlobalCtxt.lockres_cache = kmem_cache_create ("lockres_cache",
+	OcfsGlobalCtxt.lockres_cache = kmem_cache_create ("ocfs_lockres",
 		sizeof (ocfs_lock_res) + OCFS_POINTER_SIZE, 0, SLAB_NO_REAP | SLAB_HWCACHE_ALIGN,
 		NULL, NULL);
 
-	OcfsGlobalCtxt.fe_cache = kmem_cache_create ("fileentry_cache",
+	OcfsGlobalCtxt.fe_cache = kmem_cache_create ("ocfs_fileentry",
 		OCFS_SECTOR_SIZE, 0, SLAB_NO_REAP | SLAB_HWCACHE_ALIGN, NULL, NULL);
 
-	OcfsGlobalCtxt.dirnode_cache = kmem_cache_create ("dirnode_cache",
+	OcfsGlobalCtxt.dirnode_cache = kmem_cache_create ("ocfs_dirnode",
 		OCFS_DEFAULT_DIR_NODE_SIZE, 0, SLAB_NO_REAP | SLAB_HWCACHE_ALIGN, NULL, NULL);
 
 	OCFS_SET_FLAG (OcfsGlobalCtxt.flags, OCFS_FLAG_MEM_LISTS_INITIALIZED);
@@ -3760,6 +3799,7 @@
 
 	ocfs_parse_options (data, &uid, &gid, &c, &reclaim_id);
 	osb = (ocfs_super *)(sb->u.generic_sbp);
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 
 	if (!c) {
 		osb->cache_fs = false;
@@ -3835,3 +3875,5 @@
 module_init (ocfs_driver_entry);
 module_exit (ocfs_driver_exit);
 MODULE_LICENSE ("GPL");
+
+EXPORT_NO_SYMBOLS;

Modified: trunk/ocfs2/Linux/ocfsmount.c
===================================================================
--- trunk/ocfs2/Linux/ocfsmount.c	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Linux/ocfsmount.c	2004-01-29 07:56:16 UTC (rev 5)
@@ -420,6 +420,7 @@
 	}
 
 	osb = (ocfs_super *)(sb->u.generic_sbp);
+	OCFS_ASSERT(IS_VALID_OSB(osb));
 	rootoin = osb->oin_root_dir;
 
 	ocfs_down_sem (&(osb->osb_res), true);

Modified: trunk/ocfs2/Linux/ocfsport.c
===================================================================
--- trunk/ocfs2/Linux/ocfsport.c	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/ocfs2/Linux/ocfsport.c	2004-01-29 07:56:16 UTC (rev 5)
@@ -439,6 +439,7 @@
 			*off = -1;
 			return false;
 		} else {
+			OCFS_ASSERT(IS_VALID_OIN(f));
 			if (oin != NULL)
 				*oin = f;
 			if (S_ISDIR (inode->i_mode))

Added: trunk/tools/README
===================================================================
--- trunk/tools/README	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/tools/README	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1 @@
+These have all been moved to the ocfs-tools module

Added: trunk/vendor/Makefile
===================================================================
--- trunk/vendor/Makefile	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/Makefile	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,7 @@
+TOPDIR = ..
+
+include $(TOPDIR)/Preamble.make
+
+SUBDIRS = redhat unitedlinux
+
+include $(TOPDIR)/Postamble.make

Added: trunk/vendor/redhat/Makefile
===================================================================
--- trunk/vendor/redhat/Makefile	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/redhat/Makefile	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,10 @@
+TOPDIR = ../..
+
+include $(TOPDIR)/Preamble.make
+
+DIST_FILES = \
+	ocfs-2.4.9-e.spec.in	\
+	ocfs-2.4.18-e.spec.in	\
+	ocfs-2.4.21-EL.spec.in
+
+include $(TOPDIR)/Postamble.make

Added: trunk/vendor/redhat/ocfs-2.4.18-e.spec.in
===================================================================
--- trunk/vendor/redhat/ocfs-2.4.18-e.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/redhat/ocfs-2.4.18-e.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,178 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+# Turn on's and off's (summit and debug not used but added
+# for future proofing)
+%define chicks 		1
+%define buildup		1
+%define buildsmp	1
+%define buildenterprise	0
+%define buildsummit	0
+%define builddebug	0
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define base 2.4.18-e
+%define kver %{base}.37
+
+# The minimum -support package required for the kernel bits.
+%define support_ver     @SUPPORT_REQUIRED_VERSION@
+
+Summary: The Oracle Cluster Filesystem
+Name: ocfs-%{base}
+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: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: kernel >= %{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
+uniprocessor kernels.
+
+%if %{buildsmp}
+%package smp
+Summary: The Oracle Cluster Filesystem for SMP systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-smp >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description smp
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+symmetric multiprocessor kernels.
+%endif
+
+
+%if %{builddebug}
+%package debug
+Summary: The Oracle Cluster Filesystem for debugging systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-debug >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description debug
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+debugging kernels.
+%endif
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+    KVER="%{kver}"
+else
+    CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
+    case "$CURKVER" in
+    %{base}*)
+        if test -d "/usr/src/linux-${CURKVER}"; then
+            KVER="${CURKVER}"
+        fi
+        ;;
+    *)
+        ;;
+    esac
+fi
+
+if test -z "$KVER" ; then
+    if test -d "/usr/src/linux-2.4" ; then
+        KPATH="/usr/src/linux-2.4"
+    elif test -d "/usr/src/linux" ; then
+        KPATH="/usr/src/linux"
+    else
+        echo "No kernel tree to build from!" >&2
+        exit 1
+    fi
+else
+    KPATH="/usr/src/linux-${KVER}"
+fi
+    
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+
+%if %{buildup}
+make KVER=up
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-ABI/ocfs" install 
+%endif
+
+%if %{buildsmp}
+make clean
+make KVER=smp
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-smp-ABI/ocfs" install 
+%endif
+
+%if %{builddebug}
+make clean
+make KVER=debug
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}-debug-ABI/ocfs" install 
+%endif
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%if %{buildup}
+%post
+/etc/init.d/ocfs link
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{base}-ABI/ocfs
+%endif
+
+%if %{buildsmp}
+%post smp
+/etc/init.d/ocfs link
+
+%files smp
+%defattr(-,root,root)
+/lib/modules/%{base}-smp-ABI/ocfs
+%endif
+
+%if %{builddebug}
+%files debug
+%defattr(-,root,root)
+/lib/modules/%{base}-debug-ABI/ocfs
+%endif
+
+
+%changelog
+* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
+- Split out tools
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce	<philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup

Added: trunk/vendor/redhat/ocfs-2.4.21-EL.spec.in
===================================================================
--- trunk/vendor/redhat/ocfs-2.4.21-EL.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/redhat/ocfs-2.4.21-EL.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,212 @@
+#
+# Spec file for ocfs
+#
+
+# 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 chicks 		1
+%define buildup		1
+%define buildsmp	1
+%define buildhugemem	1
+%define builddebug	0
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define base 2.4.21
+%define abi 2.4.21-EL
+%define kver %{base}-4.EL
+
+# The minimum -support package required for the kernel bits.
+%define support_ver     @SUPPORT_REQUIRED_VERSION@
+
+Summary: The Oracle Cluster Filesystem
+Name: ocfs-%{abi}
+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: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: kernel >= %{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
+uniprocessor kernels.
+
+%if %{buildsmp}
+%package smp
+Summary: The Oracle Cluster Filesystem for SMP systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-smp >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description smp
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+symmetric multiprocessor kernels.
+%endif
+
+
+%if %{buildhugemem}
+%package hugemem
+Summary: The Oracle Cluster Filesystem for huge memory systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-hugemem >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description hugemem
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+symmetric multiprocessor kernels.
+%endif
+
+
+%if %{builddebug}
+%package debug
+Summary: The Oracle Cluster Filesystem for debugging systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-debug >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description debug
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+debugging kernels.
+%endif
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+    KVER="%{kver}"
+else
+    CURKVER="`uname -r | awk '{sub(/smp$|hugemem$|debug$/,"");print}'`"
+    case "$CURKVER" in
+    %{base}*)
+        if test -d "/usr/src/linux-${CURKVER}"; then
+            KVER="${CURKVER}"
+        fi
+        ;;
+    *)
+        ;;
+    esac
+fi
+
+if test -z "$KVER" ; then
+    if test -d "/usr/src/linux-2.4" ; then
+        KPATH="/usr/src/linux-2.4"
+    elif test -d "/usr/src/linux" ; then
+        KPATH="/usr/src/linux"
+    else
+        echo "No kernel tree to build from!" >&2
+        exit 1
+    fi
+else
+    KPATH="/usr/src/linux-${KVER}"
+fi
+    
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+
+%if %{buildup}
+make KVER=up
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{abi}-ABI/ocfs" install 
+%endif
+
+%if %{buildsmp}
+make clean
+make KVER=smp
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{abi}-smp-ABI/ocfs" install 
+%endif
+
+%if %{buildhugemem}
+make clean
+make KVER=hugemem
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{abi}-hugemem-ABI/ocfs" install 
+%endif
+
+%if %{builddebug}
+make clean
+make KVER=debug
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{abi}-debug-ABI/ocfs" install 
+%endif
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%if %{buildup}
+%post
+/etc/init.d/ocfs link
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{abi}-ABI/ocfs
+%endif
+
+%if %{buildsmp}
+%post smp
+/etc/init.d/ocfs link
+
+%files smp
+%defattr(-,root,root)
+/lib/modules/%{abi}-smp-ABI/ocfs
+%endif
+
+%if %{buildhugemem}
+%post hugemem
+/etc/init.d/ocfs link
+
+%files hugemem
+%defattr(-,root,root)
+/lib/modules/%{abi}-hugemem-ABI/ocfs
+%endif
+
+%if %{builddebug}
+%files debug
+%defattr(-,root,root)
+/lib/modules/%{abi}-debug-ABI/ocfs
+%endif
+
+
+%changelog
+* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
+- Split out tools
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce	<philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup

Added: trunk/vendor/redhat/ocfs-2.4.9-e.spec.in
===================================================================
--- trunk/vendor/redhat/ocfs-2.4.9-e.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/redhat/ocfs-2.4.9-e.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,258 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+# Turn on's and off's (summit and debug not used but added
+# for future proofing)
+%define chicks 		1
+%define buildup		1
+%define buildsmp	1
+%define buildenterprise	1
+%define buildsummit	1
+%define builddebug	0
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define base 2.4.9-e
+%define kver %{base}.12
+%define kveraio %{base}.25
+
+# The minimum -support package required for the kernel bits.
+%define support_ver     @SUPPORT_REQUIRED_VERSION@
+
+Summary: The Oracle Cluster Filesystem
+Name: ocfs-%{base}
+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: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+Requires: kernel >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+Obsoletes: ocfs-2.4.9-e.3, ocfs-2.4.9-e.8, ocfs-2.4.9-e.9, ocfs-2.4.9-e.10, ocfs-2.4.9-e.12
+BuildRequires: kernel-source >= %{kver}
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+uniprocessor kernels.
+
+%if %{buildsmp}
+%package smp
+Summary: The Oracle Cluster Filesystem for SMP systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-smp >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+Obsoletes: ocfs-2.4.9-e.3-smp, ocfs-2.4.9-e.8-smp, ocfs-2.4.9-e.9-smp, ocfs-2.4.9-e.10-smp, ocfs-2.4.9-e.12-smp
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description smp
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+symmetric multiprocessor kernels.
+%endif
+
+
+%if %{buildenterprise}
+%package enterprise
+Summary: The Oracle Cluster Filesystem for enterprise systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-enterprise >= %{kver}
+Requires: ocfs-support >= %{support_ver}
+Obsoletes: ocfs-2.4.9-e.3-enterprise, ocfs-2.4.9-e.8-enterprise, ocfs-2.4.9-e.9-enterprise, ocfs-2.4.9-e.10-enterprise, ocfs-2.4.9-e.12-enterprise
+BuildRequires: kernel-source >= %{kver}
+AutoReqProv: no
+
+
+%description enterprise
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+symmetric processor kernels on machines with more than 4GB of RAM.
+%endif
+
+
+%if %{buildsummit}
+%package summit
+Summary: The Oracle Cluster Filesystem for summit based systems.
+Group: System Environment/Kernel
+Provides: ocfs = %{version}
+Requires: kernel-summit >= %{kveraio}
+Requires: ocfs-support >= %{support_ver}
+Obsoletes: ocfs-2.4.9-e.3-summit, ocfs-2.4.9-e.8-summit, ocfs-2.4.9-e.9-summit, ocfs-2.4.9-e.10-summit, ocfs-2.4.9-e.12-summit
+BuildRequires: kernel-source >= %{kveraio}
+AutoReqProv: no
+
+
+%description summit
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+summit based symmetric processor kernels eg IBM's x440
+%endif
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+    KVER="%{kver}"
+else
+    echo "No %{kver} kernel tree to build from!" >&2
+    exit 1
+fi
+
+KPATH="/usr/src/linux-${KVER}"
+    
+%configure --with-kernel="${KPATH}"  --enable-aio=no
+cd ocfs2
+
+%if %{buildup}
+make clean
+make KVER=up
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-ABI/ocfs-noaio" install 
+%endif
+
+%if %{buildsmp}
+make clean
+make KVER=smp
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-smp-ABI/ocfs-noaio" install 
+%endif
+
+%if %{buildenterprise}
+make clean
+make KVER=ent
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-enterprise-ABI/ocfs-noaio" install 
+%endif
+
+
+# Now to build with AIO
+cd ..
+KVER=""
+if test -d "/usr/src/linux-%{kveraio}"; then
+    KVER="%{kveraio}"
+else
+    echo "No kernel tree to build from!" >&2
+    exit 1
+fi
+
+KPATH="/usr/src/linux-${KVER}"
+    
+%configure --with-kernel="${KPATH}"  --enable-aio=yes
+cd ocfs2
+
+%if %{buildup}
+make clean
+make KVER=up
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-ABI/ocfs" install 
+%endif
+
+%if %{buildsmp}
+make clean
+make KVER=smp
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-smp-ABI/ocfs" install 
+%endif
+
+%if %{buildenterprise}
+make clean
+make KVER=ent
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-enterprise-ABI/ocfs" install 
+%endif
+
+
+%if %{buildsummit}
+cd ..
+# Now to find a summit source tree
+KVER=""
+if test -d "/usr/src/linux-%{kveraio}summit"; then
+    KVER="%{kveraio}summit"
+else
+    echo "No %{kveraio} summit tree to build from!" >&2
+    exit 1
+fi
+
+KPATH="/usr/src/linux-${KVER}"
+    
+%configure --with-kernel="${KPATH}" --enable-aio=yes
+cd ocfs2
+
+make clean
+make KVER=summit
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{base}-summit-ABI/ocfs" install 
+%endif
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%if %{buildup}
+%post
+/etc/init.d/ocfs link
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{base}-ABI/ocfs
+/lib/modules/%{base}-ABI/ocfs-noaio
+%endif
+
+
+%if %{buildsmp}
+%post smp
+/etc/init.d/ocfs link
+
+%files smp
+%defattr(-,root,root)
+/lib/modules/%{base}-smp-ABI/ocfs
+/lib/modules/%{base}-smp-ABI/ocfs-noaio
+%endif
+
+
+%if %{buildenterprise}
+%post enterprise
+/etc/init.d/ocfs link
+
+%files enterprise
+%defattr(-,root,root)
+/lib/modules/%{base}-enterprise-ABI/ocfs
+/lib/modules/%{base}-enterprise-ABI/ocfs-noaio
+%endif
+
+%if %{buildsummit}
+%post summit
+/etc/init.d/ocfs link
+
+%files summit
+%defattr(-,root,root)
+/lib/modules/%{base}-summit-ABI/ocfs
+%endif
+
+
+%changelog
+* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
+- Split out tools
+
+* Thu Jun 26 2003 Joel Becker <joel.becker at oracle.com>
+- Added noaio support.
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce	<philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup

Added: trunk/vendor/unitedlinux/Makefile
===================================================================
--- trunk/vendor/unitedlinux/Makefile	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/unitedlinux/Makefile	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,13 @@
+TOPDIR = ../..
+
+include $(TOPDIR)/Preamble.make
+
+DIST_FILES = 					\
+	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
+
+include $(TOPDIR)/Postamble.make

Added: trunk/vendor/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/unitedlinux/ocfs-2.4.19-4GB-SMP.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,105 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define kver 2.4.19-4GB-SMP
+
+# 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: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+# Requires: kernel >= %{kver}  -- silly UL nodeps
+Requires: k_psmp = 2.4.19-304
+Requires: ocfs-support >= %{support_ver}
+# BuildRequires: kernel-source >= %{kver}  -- silly UL nodeps
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+the United Linux SMP kernel.
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+    KVER="%{kver}"
+else
+    CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
+    case "$CURKVER" in
+    %{kver}*)
+        if test -d "/usr/src/linux-${CURKVER}"; then
+            KVER="${CURKVER}"
+        fi
+        ;;
+    *)
+        ;;
+    esac
+fi
+
+if test -z "$KVER" ; then
+    if test -d "/usr/src/linux-2.4" ; then
+        KPATH="/usr/src/linux-2.4"
+    elif test -d "/usr/src/linux" ; then
+        KPATH="/usr/src/linux"
+    else
+        echo "No kernel tree to build from!" >&2
+        exit 1
+    fi
+else
+    KPATH="/usr/src/linux-${KVER}"
+fi
+    
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}/kernel/drivers/addon/ocfs" install 
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{kver}/kernel/drivers/addon/ocfs
+
+
+%changelog
+* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
+- Split out tools
+
+* Tue Apr 22 2003 Joel Becker <joel.becker at oracle.com>
+- Modified for United Linux
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce	<philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup

Added: trunk/vendor/unitedlinux/ocfs-2.4.19-4GB.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.19-4GB.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/unitedlinux/ocfs-2.4.19-4GB.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,100 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define kver 2.4.19-4GB
+
+# 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: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+# Requires: kernel >= %{kver}  -- silly UL nodeps
+Requires: k_deflt = 2.4.19-304
+Requires: ocfs-support >= %{support_ver}
+# BuildRequires: kernel-source >= %{kver}  -- silly UL nodeps
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+the United Linux SMP kernel.
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+    KVER="%{kver}"
+else
+    CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
+    case "$CURKVER" in
+    %{kver}*)
+        if test -d "/usr/src/linux-${CURKVER}"; then
+            KVER="${CURKVER}"
+        fi
+        ;;
+    *)
+        ;;
+    esac
+fi
+
+if test -z "$KVER" ; then
+    if test -d "/usr/src/linux-2.4" ; then
+        KPATH="/usr/src/linux-2.4"
+    elif test -d "/usr/src/linux" ; then
+        KPATH="/usr/src/linux"
+    else
+        echo "No kernel tree to build from!" >&2
+        exit 1
+    fi
+else
+    KPATH="/usr/src/linux-${KVER}"
+fi
+    
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}/kernel/drivers/addon/ocfs" install 
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%changelog
+* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
+- Split out tools
+
+* Tue Apr 22 2003 Joel Becker <joel.becker at oracle.com>
+- Modified for United Linux
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce	<philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup

Added: trunk/vendor/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/unitedlinux/ocfs-2.4.19-64GB-SMP.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -0,0 +1,105 @@
+#
+# Spec file for ocfs
+#
+
+# Macros
+# This one is hardcoded because, well, it belongs there
+%define _prefix /usr
+
+
+# This must be changed to the minimum ABI compat kernel version expected
+%define kver 2.4.19-64GB-SMP
+
+# 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: nobody <nobody at oracle.com>
+Provides: ocfs = %{version}
+AutoReqProv: no
+# Requires: kernel >= %{kver}  -- silly UL nodeps
+Requires: k_smp = 2.4.19-304
+Requires: ocfs-support >= %{support_ver}
+# BuildRequires: kernel-source >= %{kver}  -- silly UL nodeps
+
+
+BuildRoot: %{_tmppath}/ocfs-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
+
+
+%description
+OCFS is the Oracle Cluster Filesystem.  This package is compiled for
+the United Linux SMP kernel.
+
+
+%prep
+%setup -n ocfs-%{version}
+
+
+%build
+# Hack to find a good source tree
+KVER=""
+if test -d "/usr/src/linux-%{kver}"; then
+    KVER="%{kver}"
+else
+    CURKVER="`uname -r | awk '{sub(/smp$|enterprise$|summit$|debug$/,"");print}'`"
+    case "$CURKVER" in
+    %{kver}*)
+        if test -d "/usr/src/linux-${CURKVER}"; then
+            KVER="${CURKVER}"
+        fi
+        ;;
+    *)
+        ;;
+    esac
+fi
+
+if test -z "$KVER" ; then
+    if test -d "/usr/src/linux-2.4" ; then
+        KPATH="/usr/src/linux-2.4"
+    elif test -d "/usr/src/linux" ; then
+        KPATH="/usr/src/linux"
+    else
+        echo "No kernel tree to build from!" >&2
+        exit 1
+    fi
+else
+    KPATH="/usr/src/linux-${KVER}"
+fi
+    
+%configure --with-kernel="${KPATH}"
+cd ocfs2
+
+make
+make DESTDIR="$RPM_BUILD_ROOT" MODULEDIR="/lib/modules/%{kver}/kernel/drivers/addon/ocfs" install 
+
+
+%clean
+rm -rf "$RPM_BUILD_ROOT"
+
+
+%files
+%defattr(-,root,root)
+/lib/modules/%{kver}/kernel/drivers/addon/ocfs
+
+
+%changelog
+* Wed Jan 28 2004 Manish Singh <manish.singh at oracle.com>
+- Split out tools
+
+* Tue Apr 22 2003 Joel Becker <joel.becker at oracle.com>
+- Modified for United Linux
+
+* Thu Mar 27 2003 Joel Becker <joel.becker at oracle.com>
+- Added %if %{up} and ocfs-support Requires
+
+* Thu Mar 27 2003 Bryce	<philip.copeland at oracle.com>
+- Initial swipe at rpm spec file cleanup

Added: trunk/vendor/unitedlinux/ocfs-2.4.21-107.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.21-107.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/unitedlinux/ocfs-2.4.21-107.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -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		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
+

Added: trunk/vendor/unitedlinux/ocfs-2.4.21-111.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.21-111.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/unitedlinux/ocfs-2.4.21-111.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -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		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
+

Added: trunk/vendor/unitedlinux/ocfs-2.4.21-138.spec.in
===================================================================
--- trunk/vendor/unitedlinux/ocfs-2.4.21-138.spec.in	2004-01-29 07:51:46 UTC (rev 4)
+++ trunk/vendor/unitedlinux/ocfs-2.4.21-138.spec.in	2004-01-29 07:56:16 UTC (rev 5)
@@ -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		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
+



More information about the Ocfs-commits mailing list