[Ocfs2-commits] jlbec commits r2513 - in branches/endian-safe: .
fs/ocfs2 fs/ocfs2/cluster fs/ocfs2/dlm vendor vendor/asianux
vendor/redhat
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Aug 12 17:33:44 CDT 2005
Author: jlbec
Date: 2005-08-12 17:33:39 -0500 (Fri, 12 Aug 2005)
New Revision: 2513
Added:
branches/endian-safe/vendor/asianux/
branches/endian-safe/vendor/asianux/Makefile
branches/endian-safe/vendor/asianux/ocfs2-2.6.9-AX.spec-generic.in
Removed:
branches/endian-safe/vendor/asianux/Makefile
branches/endian-safe/vendor/asianux/ocfs2-2.6.9-AX.spec-generic.in
Modified:
branches/endian-safe/Makefile
branches/endian-safe/configure.in
branches/endian-safe/fs/ocfs2/Makefile
branches/endian-safe/fs/ocfs2/aio.c
branches/endian-safe/fs/ocfs2/cluster/heartbeat.c
branches/endian-safe/fs/ocfs2/dlm/dlmconvert.c
branches/endian-safe/fs/ocfs2/file.c
branches/endian-safe/fs/ocfs2/file.h
branches/endian-safe/fs/ocfs2/symlink.c
branches/endian-safe/vendor/Makefile
branches/endian-safe/vendor/redhat/
Log:
Sync with trunk
Modified: branches/endian-safe/Makefile
===================================================================
--- branches/endian-safe/Makefile 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/Makefile 2005-08-12 22:33:39 UTC (rev 2513)
@@ -46,6 +46,22 @@
$(TOPDIR)/mkinstalldirs $(DIST_DIR)/patches
#
+# AX2
+#
+$(TOPDIR)/vendor/asianux/ocfs2-2.6.9-%AX.spec: $(TOPDIR)/vendor/asianux/ocfs2-2.6.9-AX.spec-generic
+ SPECVER="$@"; \
+ SPECVER="$${SPECVER#*ocfs2-2.6.9-}"; \
+ SPECVER="$${SPECVER%AX.spec}"; \
+ sed -e 's/^%define sver.*%{generic}$$/%define sver '$${SPECVER}'/' < $< > $@
+
+ax2_%_srpm: dist $(TOPDIR)/vendor/asianux/ocfs2-2.6.9-%AX.spec
+ rpmbuild -bs --define "_sourcedir $(TOPDIR)" --define "_srcrpmdir $(TOPDIR)" $(TOPDIR)/vendor/asianux/ocfs2-2.6.9-$(patsubst ax2_%_srpm,%,$@)AX.spec
+
+ax2_%_rpm: ax2_%_srpm
+ rpmbuild --rebuild $(MODULEARCH) ocfs2-2.6.9-$(patsubst ax2_%_rpm,%,$@)AX-$(DIST_VERSION)-$(RPM_VERSION).src.rpm
+
+
+#
# RHEL4
#
$(TOPDIR)/vendor/redhat/ocfs2-2.6.9-%.EL.spec: $(TOPDIR)/vendor/redhat/ocfs2-2.6.9-EL.spec-generic
Modified: branches/endian-safe/configure.in
===================================================================
--- branches/endian-safe/configure.in 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/configure.in 2005-08-12 22:33:39 UTC (rev 2513)
@@ -262,6 +262,7 @@
AC_SUBST(KAPI_COMPAT_CFLAGS)
AC_OUTPUT([Config.make
+vendor/asianux/ocfs2-2.6.9-AX.spec-generic
vendor/redhat/ocfs2-2.6.9-EL.spec-generic
vendor/suse/ocfs2-2.6.5.spec-generic
])
Modified: branches/endian-safe/fs/ocfs2/Makefile
===================================================================
--- branches/endian-safe/fs/ocfs2/Makefile 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/fs/ocfs2/Makefile 2005-08-12 22:33:39 UTC (rev 2513)
@@ -27,6 +27,7 @@
endif
EXTRA_CFLAGS += -DOCFS2_DELETE_INODE_WORKAROUND
+#EXTRA_CFLAGS += -DOCFS2_CDSL
#
# Since SUBDIRS means something to kbuild, define them safely. Do not
Modified: branches/endian-safe/fs/ocfs2/aio.c
===================================================================
--- branches/endian-safe/fs/ocfs2/aio.c 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/fs/ocfs2/aio.c 2005-08-12 22:33:39 UTC (rev 2513)
@@ -346,7 +346,7 @@
*/
ocfs2_file_finish_extension(inode,
!okp->kp_info.wl_newsize,
- !okp->kp_info.wl_do_direct_io);
+ okp->kp_info.wl_do_direct_io);
okp->kp_info.wl_extended = 0;
}
if (ret) {
Modified: branches/endian-safe/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- branches/endian-safe/fs/ocfs2/cluster/heartbeat.c 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/fs/ocfs2/cluster/heartbeat.c 2005-08-12 22:33:39 UTC (rev 2513)
@@ -20,6 +20,7 @@
*/
#include <linux/kernel.h>
+#include <linux/sched.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/fs.h>
@@ -124,6 +125,12 @@
u64 hr_generation;
struct work_struct hr_write_timeout_work;
+ unsigned long hr_last_timeout_start;
+
+ /* Used during o2hb_check_slot to hold a copy of the block
+ * being checked because we temporarily have to zero out the
+ * crc field. */
+ struct o2hb_disk_heartbeat_block *hr_tmp_block;
};
struct o2hb_bio_wait_ctxt {
@@ -136,8 +143,8 @@
struct o2hb_region *reg = arg;
mlog(ML_ERROR, "Heartbeat write timeout to device %s after %u "
- "milliseconds\n", reg->hr_dev_name, O2HB_MAX_WRITE_TIMEOUT_MS);
-
+ "milliseconds\n", reg->hr_dev_name,
+ jiffies_to_msecs(jiffies - reg->hr_last_timeout_start));
o2quo_disk_timeout();
}
@@ -146,6 +153,7 @@
mlog(0, "Queue write timeout for %u ms\n", O2HB_MAX_WRITE_TIMEOUT_MS);
cancel_delayed_work(®->hr_write_timeout_work);
+ reg->hr_last_timeout_start = jiffies;
schedule_delayed_work(®->hr_write_timeout_work,
msecs_to_jiffies(O2HB_MAX_WRITE_TIMEOUT_MS));
}
@@ -420,6 +428,15 @@
return ret;
}
+static void o2hb_dump_slot(struct o2hb_disk_heartbeat_block *hb_block)
+{
+ mlog(ML_ERROR, "Dump slot information: seq = 0x%"MLFx64", node = %u, "
+ "cksum = 0x%x, generation 0x%"MLFx64"\n",
+ le64_to_cpu(hb_block->hb_seq), hb_block->hb_node,
+ le32_to_cpu(hb_block->hb_cksum),
+ le64_to_cpu(hb_block->hb_generation));
+}
+
static int o2hb_verify_crc(struct o2hb_region *reg,
struct o2hb_disk_heartbeat_block *hb_block)
{
@@ -600,9 +617,11 @@
struct o2hb_node_event event =
{ .hn_item = LIST_HEAD_INIT(event.hn_item), };
struct o2nm_node *node;
- struct o2hb_disk_heartbeat_block *hb_block = slot->ds_raw_block;
+ struct o2hb_disk_heartbeat_block *hb_block = reg->hr_tmp_block;
u64 cputime;
+ memcpy(hb_block, slot->ds_raw_block, reg->hr_block_bytes);
+
/* Is this correct? Do we assume that the node doesn't exist
* if we're not configured for him? */
node = o2nm_get_node_by_num(slot->ds_node_num);
@@ -625,6 +644,7 @@
* other values as they may be junk. */
mlog(ML_ERROR, "Node %d has written a bad crc to %s\n",
slot->ds_node_num, reg->hr_dev_name);
+ o2hb_dump_slot(hb_block);
slot->ds_equal_samples++;
goto fire_callbacks;
@@ -828,6 +848,8 @@
mlog(ML_HEARTBEAT|ML_KTHREAD, "hb thread running\n");
+ set_user_nice(current, -20);
+
while (!kthread_should_stop() && !reg->hr_unclean_stop) {
o2hb_do_disk_heartbeat(reg);
@@ -919,6 +941,9 @@
struct page *page;
struct o2hb_region *reg = to_o2hb_region(item);
+ if (reg->hr_tmp_block)
+ kfree(reg->hr_tmp_block);
+
if (reg->hr_slot_data) {
for (i = 0; i < reg->hr_num_pages; i++) {
page = reg->hr_slot_data[i];
@@ -1083,6 +1108,12 @@
char *raw;
struct o2hb_disk_slot *slot;
+ reg->hr_tmp_block = kmalloc(reg->hr_block_bytes, GFP_KERNEL);
+ if (reg->hr_tmp_block == NULL) {
+ mlog_errno(-ENOMEM);
+ return -ENOMEM;
+ }
+
reg->hr_slots = kcalloc(reg->hr_blocks,
sizeof(struct o2hb_disk_slot), GFP_KERNEL);
if (reg->hr_slots == NULL) {
Modified: branches/endian-safe/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- branches/endian-safe/fs/ocfs2/dlm/dlmconvert.c 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/fs/ocfs2/dlm/dlmconvert.c 2005-08-12 22:33:39 UTC (rev 2513)
@@ -384,7 +384,7 @@
} else if (ret == DLM_FORWARD) {
mlog(0, "node %u returned DLM_FORWARD from convert "
"message!\n", res->owner);
- } else if (ret != DLM_NORMAL)
+ } else if (ret != DLM_NORMAL && ret != DLM_NOTQUEUED)
dlm_error(ret);
} else {
mlog_errno(tmpret);
Modified: branches/endian-safe/fs/ocfs2/file.c
===================================================================
--- branches/endian-safe/fs/ocfs2/file.c 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/fs/ocfs2/file.c 2005-08-12 22:33:39 UTC (rev 2513)
@@ -156,29 +156,34 @@
void ocfs2_file_finish_extension(struct inode *inode,
loff_t newsize,
- unsigned should_zero)
+ unsigned direct_extend)
{
- mlog(0, "inode %"MLFu64", newsize = %lld, should_zero = %u\n",
- OCFS2_I(inode)->ip_blkno, (long long)newsize, should_zero);
+ int status;
+ mlog(0, "inode %"MLFu64", newsize = %lld, direct_extend = %u\n",
+ OCFS2_I(inode)->ip_blkno, (long long)newsize, direct_extend);
+
ocfs2_update_inode_size(inode, newsize);
- if (!should_zero) {
+#ifdef OCFS2_ORACORE_WORKAROUNDS
+ if (direct_extend) {
/*
* This leaves dirty data in holes.
* Caveat Emptor.
*/
OCFS2_I(inode)->ip_mmu_private = newsize;
- } else {
- int status = ocfs2_zero_extend(inode);
- /*
- * Don't overwrite the result of
- * generic_file_write
- */
- if (status)
- mlog(ML_ERROR, "Unable to pre-zero extension of inode "
- "(%d)\n", status);
+ return;
}
+#endif
+
+ status = ocfs2_zero_extend(inode);
+ /*
+ * Don't overwrite the result of
+ * generic_file_write
+ */
+ if (status)
+ mlog(ML_ERROR, "Unable to pre-zero extension of inode "
+ "(%d)\n", status);
}
static ssize_t ocfs2_file_write(struct file *filp,
@@ -244,7 +249,7 @@
* an error was returned by, say, data locking */
if (info.wl_extended)
ocfs2_file_finish_extension(inode, info.wl_newsize,
- !info.wl_do_direct_io);
+ info.wl_do_direct_io);
if (info.wl_unlock_ctxt)
ocfs2_unlock_buffer_inodes(&ctxt);
if (info.wl_have_i_sem)
@@ -1044,12 +1049,14 @@
if (bytes_added)
ocfs2_update_inode_size(inode, newsize);
+#ifdef OCFS2_ORACORE_WORKAROUNDS
spin_lock(&OCFS2_I(inode)->ip_lock);
if (OCFS2_I(inode)->ip_flags & OCFS2_INODE_OPEN_DIRECT) {
/* This is a total broken hack for O_DIRECT crack */
OCFS2_I(inode)->ip_mmu_private = i_size_read(inode);
}
spin_unlock(&OCFS2_I(inode)->ip_lock);
+#endif
status = ocfs2_zero_extend(inode);
if (status < 0) {
mlog_errno(status);
Modified: branches/endian-safe/fs/ocfs2/file.h
===================================================================
--- branches/endian-safe/fs/ocfs2/file.h 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/fs/ocfs2/file.h 2005-08-12 22:33:39 UTC (rev 2513)
@@ -59,6 +59,6 @@
u64 new_i_size);
void ocfs2_file_finish_extension(struct inode *inode, loff_t newsize,
- unsigned should_zero);
+ unsigned direct_extend);
#endif /* OCFS2_FILE_H */
Modified: branches/endian-safe/fs/ocfs2/symlink.c
===================================================================
--- branches/endian-safe/fs/ocfs2/symlink.c 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/fs/ocfs2/symlink.c 2005-08-12 22:33:39 UTC (rev 2513)
@@ -53,27 +53,96 @@
#include "buffer_head_io.h"
+static char *ocfs2_page_getlink(struct dentry * dentry,
+ struct page **ppage);
+static char *ocfs2_fast_symlink_getlink(struct inode *inode,
+ struct buffer_head **bh);
+
+/* get the link contents into pagecache */
+static char *ocfs2_page_getlink(struct dentry * dentry,
+ struct page **ppage)
+{
+ struct page * page;
+ struct address_space *mapping = dentry->d_inode->i_mapping;
+ page = read_cache_page(mapping, 0,
+ (filler_t *)mapping->a_ops->readpage, NULL);
+ if (IS_ERR(page))
+ goto sync_fail;
+ wait_on_page_locked(page);
+ if (!PageUptodate(page))
+ goto async_fail;
+ *ppage = page;
+ return kmap(page);
+
+async_fail:
+ page_cache_release(page);
+ return ERR_PTR(-EIO);
+
+sync_fail:
+ return (char*)page;
+}
+
+static char *ocfs2_fast_symlink_getlink(struct inode *inode,
+ struct buffer_head **bh)
+{
+ int status;
+ char *link = NULL;
+ ocfs2_dinode *fe;
+
+ mlog_entry_void();
+
+ status = ocfs2_read_block(OCFS2_SB(inode->i_sb),
+ OCFS2_I(inode)->ip_blkno,
+ bh,
+ OCFS2_BH_CACHED,
+ inode);
+ if (status < 0) {
+ mlog_errno(status);
+ link = ERR_PTR(status);
+ goto bail;
+ }
+
+ fe = (ocfs2_dinode *) (*bh)->b_data;
+ link = (char *) fe->id2.i_symlink;
+bail:
+ mlog_exit(status);
+
+ return link;
+}
+
+static int ocfs2_readlink(struct dentry *dentry,
+ char __user *buffer,
+ int buflen)
+{
+ int ret;
+ char *link;
+ struct buffer_head *bh = NULL;
+ struct inode *inode = dentry->d_inode;
+
+ mlog_entry_void();
+
+ link = ocfs2_fast_symlink_getlink(inode, &bh);
+ if (IS_ERR(link)) {
+ ret = PTR_ERR(link);
+ goto out;
+ }
+
+ ret = vfs_readlink(dentry, buffer, buflen, link);
+
+ brelse(bh);
+out:
+ mlog_exit(ret);
+ return ret;
+}
+
+#ifdef OCFS2_CDSL
+
struct ocfs2_symlink_ops {
const char *name;
const unsigned int len;
unsigned int (*subst_fn) (char *str, void *data);
};
-static unsigned int ocfs2_link_size(struct ocfs2_symlink_ops *ops,
- char *str,
- struct inode *inode);
-static void ocfs2_link_expand(struct ocfs2_symlink_ops *ops,
- char *out,
- char *in,
- struct inode *inode);
-static char *ocfs2_fast_symlink_getlink(struct inode *inode,
- struct buffer_head **bh);
-static int ocfs2_readlink(struct dentry *dentry,
- char __user *buffer,
- int buflen);
-
-/* Context Dependent Symbolic Link (CDSL) code */
-
/**
*** sym_hostname - Substitute system host name
*** @str: String for result
@@ -216,103 +285,7 @@
{NULL, 0, NULL}
};
-/* CDSL code - end
- **/
-static char *ocfs2_page_getlink(struct dentry * dentry,
- struct page **ppage);
-
-/* get the link contents into pagecache */
-static char *ocfs2_page_getlink(struct dentry * dentry,
- struct page **ppage)
-{
- struct page * page;
- struct address_space *mapping = dentry->d_inode->i_mapping;
- page = read_cache_page(mapping, 0,
- (filler_t *)mapping->a_ops->readpage, NULL);
- if (IS_ERR(page))
- goto sync_fail;
- wait_on_page_locked(page);
- if (!PageUptodate(page))
- goto async_fail;
- *ppage = page;
- return kmap(page);
-
-async_fail:
- page_cache_release(page);
- return ERR_PTR(-EIO);
-
-sync_fail:
- return (char*)page;
-}
-
-static char *ocfs2_fast_symlink_getlink(struct inode *inode,
- struct buffer_head **bh)
-{
- int status;
- char *link = NULL;
- ocfs2_dinode *fe;
-
- mlog_entry_void();
-
- status = ocfs2_read_block(OCFS2_SB(inode->i_sb),
- OCFS2_I(inode)->ip_blkno,
- bh,
- OCFS2_BH_CACHED,
- inode);
- if (status < 0) {
- mlog_errno(status);
- link = ERR_PTR(status);
- goto bail;
- }
-
- fe = (ocfs2_dinode *) (*bh)->b_data;
- link = (char *) fe->id2.i_symlink;
-bail:
- mlog_exit(status);
-
- return link;
-}
-
-static int ocfs2_follow_link(struct dentry *dentry, struct nameidata *nd)
-{
- struct inode *inode = dentry->d_inode;
- struct page *page = NULL;
- struct buffer_head *bh = NULL;
- char *orig_link, *new_link;
- unsigned int len, res = 0;
-
- if (ocfs2_inode_is_fast_symlink(inode))
- orig_link = ocfs2_fast_symlink_getlink(inode, &bh);
- else
- orig_link = ocfs2_page_getlink(dentry, &page);
-
- if (IS_ERR(orig_link)) {
- res = PTR_ERR(orig_link);
- goto out;
- }
-
- len = ocfs2_link_size(symlink_ops, orig_link, inode);
- new_link = kmalloc(len, GFP_KERNEL);
- if (new_link == NULL) {
- res = ENOMEM;
- goto out;
- }
- ocfs2_link_expand(symlink_ops, new_link, orig_link, inode);
- res = vfs_follow_link(nd, new_link);
- out:
- if (page) {
- kunmap(page);
- page_cache_release(page);
- }
- if (bh)
- brelse(bh);
-
- return res;
-}
-
-
-
/**
*** ocfs2_link_expand - Expand a context sensitive symlink
*** @ops: The symlink substitution operations table
@@ -376,29 +349,69 @@
return len + 1;
}
-static int ocfs2_readlink(struct dentry *dentry,
- char __user *buffer,
- int buflen)
+static inline int ocfs2_cdsl_follow_link(struct nameidata *nd,
+ char *old_link,
+ struct inode *inode)
{
- int ret;
+ int status;
+ char *new_link;
+ unsigned int len;
+
+ len = ocfs2_link_size(symlink_ops, old_link, inode);
+ new_link = kmalloc(len, GFP_KERNEL);
+ if (new_link == NULL) {
+ status = -ENOMEM;
+ mlog_errno(status);
+ goto bail;
+ }
+
+ ocfs2_link_expand(symlink_ops, new_link, old_link, inode);
+
+ status = vfs_follow_link(nd, new_link);
+ if (status < 0)
+ mlog_errno(status);
+
+ kfree(new_link);
+bail:
+ return status;
+}
+#endif
+
+static int ocfs2_follow_link(struct dentry *dentry,
+ struct nameidata *nd)
+{
+ int status;
char *link;
+ struct inode *inode = dentry->d_inode;
+ struct page *page = NULL;
struct buffer_head *bh = NULL;
- struct inode *inode = dentry->d_inode;
-
- mlog_entry_void();
-
- link = ocfs2_fast_symlink_getlink(inode, &bh);
+
+ if (ocfs2_inode_is_fast_symlink(inode))
+ link = ocfs2_fast_symlink_getlink(inode, &bh);
+ else
+ link = ocfs2_page_getlink(dentry, &page);
if (IS_ERR(link)) {
- ret = PTR_ERR(link);
- goto out;
+ status = PTR_ERR(link);
+ mlog_errno(status);
+ goto bail;
}
- ret = vfs_readlink(dentry, buffer, buflen, link);
+#ifdef OCFS2_CDSL
+ status = ocfs2_cdsl_follow_link(nd, link, inode);
+#else
+ status = vfs_follow_link(nd, link);
+#endif
+ if (status)
+ mlog_errno(status);
+bail:
+ if (page) {
+ kunmap(page);
+ page_cache_release(page);
+ }
+ if (bh)
+ brelse(bh);
- brelse(bh);
-out:
- mlog_exit(ret);
- return ret;
+ return status;
}
struct inode_operations ocfs2_symlink_inode_operations = {
Modified: branches/endian-safe/vendor/Makefile
===================================================================
--- branches/endian-safe/vendor/Makefile 2005-08-12 16:53:55 UTC (rev 2512)
+++ branches/endian-safe/vendor/Makefile 2005-08-12 22:33:39 UTC (rev 2513)
@@ -2,6 +2,6 @@
include $(TOPDIR)/Preamble.make
-SUBDIRS = redhat suse
+SUBDIRS = asianux redhat suse
include $(TOPDIR)/Postamble.make
Copied: branches/endian-safe/vendor/asianux (from rev 2511, trunk/vendor/asianux)
Property changes on: branches/endian-safe/vendor/asianux
___________________________________________________________________
Name: svn:ignore
+ .*.sw?
ocfs2-*.spec-generic
Deleted: branches/endian-safe/vendor/asianux/Makefile
===================================================================
--- trunk/vendor/asianux/Makefile 2005-08-12 16:43:11 UTC (rev 2511)
+++ branches/endian-safe/vendor/asianux/Makefile 2005-08-12 22:33:39 UTC (rev 2513)
@@ -1,8 +0,0 @@
-TOPDIR = ../..
-
-include $(TOPDIR)/Preamble.make
-
-DIST_FILES = \
- ocfs2-2.6.9-AX.spec-generic.in
-
-include $(TOPDIR)/Postamble.make
Copied: branches/endian-safe/vendor/asianux/Makefile (from rev 2511, trunk/vendor/asianux/Makefile)
Deleted: branches/endian-safe/vendor/asianux/ocfs2-2.6.9-AX.spec-generic.in
===================================================================
--- trunk/vendor/asianux/ocfs2-2.6.9-AX.spec-generic.in 2005-08-12 16:43:11 UTC (rev 2511)
+++ branches/endian-safe/vendor/asianux/ocfs2-2.6.9-AX.spec-generic.in 2005-08-12 22:33:39 UTC (rev 2513)
@@ -1,196 +0,0 @@
-#
-# Spec file for OCFS2 on AX2
-#
-
-# Macros
-# This one is hardcoded because, well, it belongs there
-%define _prefix /usr
-# Because RPM is dumb
-%define _unpackaged_files_terminate_build 0
-
-# Turn ons and offs
-%define buildup 1
-%define buildsmp 1
-%define buildhugemem 1
-
-%ifarch i386 i686
-%define karch i686
-%endif
-
-%ifarch x86_64
-%define karch x86_64
-%define buildhugemem 0
-%endif
-
-%ifarch ia64
-%define karch ia64
-%define buildsmp 0
-%define buildhugemem 0
-%endif
-
-%define base 2.6.9
-%define sver %{generic}
-%define kver %{base}-%{sver}AX
-
-# The minimum tools package required for the kernel bits.
-%define tools_ver @TOOLS_REQUIRED_VERSION@
-
-Summary: The Oracle Cluster Filesystem 2.
-Name: ocfs2-%{kver}
-Version: @DIST_VERSION@
-Release: @RPM_VERSION@
-Copyright: GPL
-Group: System Environment/Kernel
-Source: ocfs2- at DIST_VERSION@.tar.gz
-URL: http://oss.oracle.com/projects/ocfs2/
-Distribution: Oracle
-Vendor: Oracle
-Packager: Joel Becker <joel.becker at oracle.com>
-Provides: ocfs2 = %{version}
-AutoReqProv: no
-Requires: kernel = %{kver}
-Requires: ocfs2-tools >= %{tools_ver}
-BuildRequires: kernel-devel = %{kver}
-
-
-BuildRoot: %{_tmppath}/ocfs2-%{PACKAGE_VERSION}-%{PACKAGE_RELEASE}-root
-
-
-%description
-OCFS2 is the Oracle Cluster Filesystem 2. This package is compiled for
-uniprocessor kernels.
-
-%if %{buildsmp}
-%package -n ocfs2-%{kver}smp
-Summary: The Oracle Cluster File System 2 for SMP systems.
-Group: System Environment/Kernel
-Provides: ocfs2 = %{version}
-Requires: kernel-smp = %{kver}
-Requires: ocfs2-tools >= %{tools_ver}
-BuildRequires: kernel-smp-devel = %{kver}
-AutoReqProv: no
-
-%description -n ocfs2-%{kver}smp
-OCFS2 is the Oracle Cluster Filesystem 2. This package is compiled for
-symmetric multiprocessor kernels.
-%endif
-
-
-%if %{buildhugemem}
-%package -n ocfs2-%{kver}hugemem
-Summary: The Oracle Cluster File System 2 for huge memory systems.
-Group: System Environment/Kernel
-Provides: ocfs2 = %{version}
-Requires: kernel-hugemem = %{kver}
-Requires: ocfs2-tools >= %{tools_ver}
-BuildRequires: kernel-hugemem-devel = %{kver}
-AutoReqProv: no
-
-%description -n ocfs2-%{kver}hugemem
-OCFS2 is the Oracle Cluster Filesystem 2. This package is compiled for
-symmetric multiprocessor kernels.
-%endif
-
-
-%prep
-%setup -n ocfs2-%{version}
-
-
-%build
-%if %{buildup}
-KPATH="/usr/src/kernels/%{kver}-%{karch}"
-%configure --with-kernel="${KPATH}"
-
-make
-make DESTDIR="$RPM_BUILD_ROOT" INSTALL_MOD_PATH='$(DESTDIR)' install
-
-# 2.6 kbuild can't do this install nicely
-EXTRA_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}/extra"
-INST_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}/kernel"
-mkdir -p "${INST_MODLIB}/fs/ocfs2"
-mv "${EXTRA_MODLIB}"/ocfs2*.ko "${INST_MODLIB}/fs/ocfs2/"
-mkdir -p "${INST_MODLIB}/fs/configfs"
-mv "${EXTRA_MODLIB}"/configfs.ko "${INST_MODLIB}/fs/configfs/"
-rm "${EXTRA_MODLIB}"/*.ko
-
-make clean
-%endif
-
-%if %{buildsmp}
-KPATH="/usr/src/kernels/%{kver}-smp-%{karch}"
-%configure --with-kernel="${KPATH}"
-
-make
-make DESTDIR="$RPM_BUILD_ROOT" INSTALL_MOD_PATH='$(DESTDIR)' install
-
-# 2.6 kbuild can't do this install nicely
-EXTRA_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}smp/extra"
-INST_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}smp/kernel"
-mkdir -p "${INST_MODLIB}/fs/ocfs2"
-mv "${EXTRA_MODLIB}"/ocfs2*.ko "${INST_MODLIB}/fs/ocfs2/"
-mkdir -p "${INST_MODLIB}/fs/configfs"
-mv "${EXTRA_MODLIB}"/configfs.ko "${INST_MODLIB}/fs/configfs/"
-rm "${EXTRA_MODLIB}"/*.ko
-
-make clean
-%endif
-
-%if %{buildhugemem}
-KPATH="/usr/src/kernels/%{kver}-hugemem-%{karch}"
-%configure --with-kernel="${KPATH}"
-
-make
-make DESTDIR="$RPM_BUILD_ROOT" INSTALL_MOD_PATH='$(DESTDIR)' install
-
-# 2.6 kbuild can't do this install nicely
-EXTRA_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}hugemem/extra"
-INST_MODLIB="${RPM_BUILD_ROOT}/lib/modules/%{kver}hugemem/kernel"
-mkdir -p "${INST_MODLIB}/fs/ocfs2"
-mv "${EXTRA_MODLIB}"/ocfs2*.ko "${INST_MODLIB}/fs/ocfs2/"
-mkdir -p "${INST_MODLIB}/fs/configfs"
-mv "${EXTRA_MODLIB}"/configfs.ko "${INST_MODLIB}/fs/configfs/"
-rm "${EXTRA_MODLIB}"/*.ko
-
-make clean
-%endif
-
-
-%clean
-rm -rf "$RPM_BUILD_ROOT"
-
-
-%if %{buildup}
-%post
-depmod -a
-
-%files
-%defattr(-,root,root)
-/lib/modules/%{kver}/kernel/fs
-%endif
-
-%if %{buildsmp}
-%post -n ocfs2-%{kver}smp
-depmod -a
-
-%files -n ocfs2-%{kver}smp
-%defattr(-,root,root)
-/lib/modules/%{kver}smp/kernel/fs
-%endif
-
-
-%if %{buildhugemem}
-%post -n ocfs2-%{kver}hugemem
-depmod -a
-
-%files -n ocfs2-%{kver}hugemem
-%defattr(-,root,root)
-/lib/modules/%{kver}hugemem/kernel/fs
-%endif
-
-
-%changelog
-* Fri Aug 12 2005 Dean Tan <dean.tan at oracle.com>
-- Modified for Asianux
-
-* Mon Jan 24 2004 Manish Singh <manish.singh at oracle.com>
-- Initial rpm spec file
Copied: branches/endian-safe/vendor/asianux/ocfs2-2.6.9-AX.spec-generic.in (from rev 2511, trunk/vendor/asianux/ocfs2-2.6.9-AX.spec-generic.in)
Property changes on: branches/endian-safe/vendor/redhat
___________________________________________________________________
Name: svn:ignore
- ocfs2-*.spec-generic
+ ocfs2-*.spec-generic
.*.sw?
More information about the Ocfs2-commits
mailing list