From 8db276acddfb4946047c9603181460ccdf7e1bae Mon Sep 17 00:00:00 2001 From: mmex Date: Thu, 10 Apr 2003 10:14:58 +0000 Subject: [PATCH] Fixes to make compile on HP PNNL kernels. --- .../complete_patches/hp-pnnl-2.4.20-l16.patch | 123 +++------------------ .../kernel_patches/patches/exports_hp_2.4.20.patch | 53 +++++++++ lustre/kernel_patches/pc/exports_hp_2.4.20.pc | 4 + 3 files changed, 70 insertions(+), 110 deletions(-) create mode 100644 lustre/kernel_patches/patches/exports_hp_2.4.20.patch create mode 100644 lustre/kernel_patches/pc/exports_hp_2.4.20.pc diff --git a/lustre/kernel_patches/complete_patches/hp-pnnl-2.4.20-l16.patch b/lustre/kernel_patches/complete_patches/hp-pnnl-2.4.20-l16.patch index ca8bf99..a9cb5c2 100644 --- a/lustre/kernel_patches/complete_patches/hp-pnnl-2.4.20-l16.patch +++ b/lustre/kernel_patches/complete_patches/hp-pnnl-2.4.20-l16.patch @@ -75,17 +75,14 @@ _ - - - - fs/ext3/Makefile | 4 +++- + fs/ext3/Makefile | 2 ++ fs/ext3/super.c | 2 +- include/linux/fs.h | 1 + - kernel/ksyms.c | 5 +++++ - 4 files changed, 10 insertions(+), 2 deletions(-) + kernel/ksyms.c | 4 ++++ + 4 files changed, 8 insertions(+), 1 deletion(-) ---- linux-2.4.20/fs/ext3/Makefile~exports_hp Sat Apr 5 03:55:19 2003 -+++ linux-2.4.20-braam/fs/ext3/Makefile Sat Apr 5 03:56:03 2003 +--- linux/fs/ext3/Makefile~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/fs/ext3/Makefile Wed Apr 9 10:19:53 2003 @@ -9,6 +9,8 @@ O_TARGET := ext3.o @@ -95,8 +92,8 @@ _ obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ ioctl.o namei.o super.o symlink.o obj-m := $(O_TARGET) ---- linux-2.4.20/fs/ext3/super.c~exports_hp Sat Apr 5 03:55:19 2003 -+++ linux-2.4.20-braam/fs/ext3/super.c Sat Apr 5 03:55:19 2003 +--- linux/fs/ext3/super.c~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/fs/ext3/super.c Wed Apr 9 10:19:53 2003 @@ -1769,7 +1769,7 @@ static void __exit exit_ext3_fs(void) unregister_filesystem(&ext3_fs_type); } @@ -106,9 +103,9 @@ _ MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); ---- linux-2.4.20/include/linux/fs.h~exports_hp Sat Apr 5 03:55:19 2003 -+++ linux-2.4.20-braam/include/linux/fs.h Sat Apr 5 03:55:19 2003 -@@ -1005,6 +1005,7 @@ extern int unregister_filesystem(struct +--- linux/include/linux/fs.h~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/include/linux/fs.h Wed Apr 9 10:19:53 2003 +@@ -1020,6 +1020,7 @@ extern int unregister_filesystem(struct extern struct vfsmount *kern_mount(struct file_system_type *); extern int may_umount(struct vfsmount *); extern long do_mount(char *, char *, char *, unsigned long, void *); @@ -116,15 +113,14 @@ _ #define kern_umount mntput ---- linux-2.4.20/kernel/ksyms.c~exports_hp Sat Apr 5 03:55:19 2003 -+++ linux-2.4.20-braam/kernel/ksyms.c Sat Apr 5 03:55:19 2003 -@@ -284,6 +284,11 @@ EXPORT_SYMBOL(dcache_dir_fsync); +--- linux/kernel/ksyms.c~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/kernel/ksyms.c Wed Apr 9 10:19:53 2003 +@@ -308,6 +308,10 @@ EXPORT_SYMBOL(dcache_dir_fsync); EXPORT_SYMBOL(dcache_readdir); EXPORT_SYMBOL(dcache_dir_ops); +/* lustre */ +EXPORT_SYMBOL(pagecache_lock_cacheline); -+EXPORT_SYMBOL(panic_notifier_list); +EXPORT_SYMBOL(do_kern_mount); + /* for stackable file systems (lofs, wrapfs, cryptfs, etc.) */ @@ -10741,96 +10737,3 @@ _ #endif /* _LINUX_EXT3_FS_H */ _ - fs/ext3/inode.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 82 insertions(+) - ---- linux-2.4.20/fs/ext3/inode.c~extN-san 2003-04-08 23:35:59.000000000 -0600 -+++ linux-2.4.20-braam/fs/ext3/inode.c 2003-04-08 23:35:59.000000000 -0600 -@@ -2734,3 +2734,85 @@ int ext3_change_inode_journal_flag(struc - * here, in ext3_aops_journal_start() to ensure that the forthcoming "see if we - * need to extend" test in ext3_prepare_write() succeeds. - */ -+ -+/* for each block: 1 ind + 1 dind + 1 tind -+ * for each block: 3 bitmap blocks -+ * for each block: 3 group descriptor blocks -+ * i inode block -+ * 1 superblock -+ * 2 * EXT3_SINGLEDATA_TRANS_BLOCKS for the quote files -+ * ((1+1+1) * 3 * nblocks) + 1 + 1 + 2 * EXT3_SINGLEDATA_TRANS_BLOCKS -+ * -+ * XXX assuming: -+ * (1) fs logic block size == page size -+ * (2) ext3 in writeback mode -+ */ -+static inline int ext3_san_write_trans_blocks(int nblocks) -+{ -+ int ret; -+ -+ ret = (1 + 1 + 1) * 3 * nblocks + 1 + 1; -+ -+#ifdef CONFIG_QUOTA -+ ret += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS; -+#endif -+ -+ return ret; -+} -+ -+/* Alloc blocks for an inode, while don't create any buffer/page -+ * for data I/O; set the inode size if file is extended. -+ * -+ * @inode: target inode -+ * @blocks: array of logic block number -+ * @nblocks: how many blocks need be alloced -+ * @newsize: new filesize we should set -+ * -+ * return: 0 success, otherwise failed -+ * (*blocks) contains physical block number alloced -+ * -+ * XXX this assume the fs block size == page size -+ */ -+int ext3_prep_san_write(struct inode *inode, long *blocks, -+ int nblocks, loff_t newsize) -+{ -+ handle_t *handle; -+ struct buffer_head bh_tmp; -+ int needed_blocks; -+ int i, ret = 0, ret2; -+ -+ needed_blocks = ext3_san_write_trans_blocks(nblocks); -+ -+ lock_kernel(); -+ handle = ext3_journal_start(inode, needed_blocks); -+ if (IS_ERR(handle)) { -+ unlock_kernel(); -+ return PTR_ERR(handle); -+ } -+ unlock_kernel(); -+ -+ /* alloc blocks one by one */ -+ for (i = 0; i < nblocks; i++) { -+ ret = ext3_get_block_handle(handle, inode, blocks[i], -+ &bh_tmp, 1); -+ if (ret) -+ break; -+ -+ blocks[i] = bh_tmp.b_blocknr; -+ } -+ -+ /* set inode size if needed */ -+ if (!ret && (newsize > inode->i_size)) { -+ inode->i_size = newsize; -+ ext3_mark_inode_dirty(handle, inode); -+ } -+ -+ lock_kernel(); -+ ret2 = ext3_journal_stop(handle, inode); -+ unlock_kernel(); -+ -+ if (!ret) -+ ret = ret2; -+ return ret; -+} -+EXPORT_SYMBOL(ext3_prep_san_write); - -_ diff --git a/lustre/kernel_patches/patches/exports_hp_2.4.20.patch b/lustre/kernel_patches/patches/exports_hp_2.4.20.patch new file mode 100644 index 0000000..feaeec6 --- /dev/null +++ b/lustre/kernel_patches/patches/exports_hp_2.4.20.patch @@ -0,0 +1,53 @@ + fs/ext3/Makefile | 2 ++ + fs/ext3/super.c | 2 +- + include/linux/fs.h | 1 + + kernel/ksyms.c | 4 ++++ + 4 files changed, 8 insertions(+), 1 deletion(-) + +--- linux/fs/ext3/Makefile~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/fs/ext3/Makefile Wed Apr 9 10:19:53 2003 +@@ -9,6 +9,8 @@ + + O_TARGET := ext3.o + ++export-objs := super.o inode.o ++ + obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ + ioctl.o namei.o super.o symlink.o + obj-m := $(O_TARGET) +--- linux/fs/ext3/super.c~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/fs/ext3/super.c Wed Apr 9 10:19:53 2003 +@@ -1769,7 +1769,7 @@ static void __exit exit_ext3_fs(void) + unregister_filesystem(&ext3_fs_type); + } + +-EXPORT_NO_SYMBOLS; ++EXPORT_SYMBOL(ext3_bread); + + MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); + MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); +--- linux/include/linux/fs.h~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/include/linux/fs.h Wed Apr 9 10:19:53 2003 +@@ -1020,6 +1020,7 @@ extern int unregister_filesystem(struct + extern struct vfsmount *kern_mount(struct file_system_type *); + extern int may_umount(struct vfsmount *); + extern long do_mount(char *, char *, char *, unsigned long, void *); ++struct vfsmount *do_kern_mount(const char *type, int flags, char *name, void *data); + + #define kern_umount mntput + +--- linux/kernel/ksyms.c~exports_2.4.20 Wed Apr 9 10:07:14 2003 ++++ linux-mmonroe/kernel/ksyms.c Wed Apr 9 10:19:53 2003 +@@ -308,6 +308,10 @@ EXPORT_SYMBOL(dcache_dir_fsync); + EXPORT_SYMBOL(dcache_readdir); + EXPORT_SYMBOL(dcache_dir_ops); + ++/* lustre */ ++EXPORT_SYMBOL(pagecache_lock_cacheline); ++EXPORT_SYMBOL(do_kern_mount); ++ + /* for stackable file systems (lofs, wrapfs, cryptfs, etc.) */ + EXPORT_SYMBOL(default_llseek); + EXPORT_SYMBOL(dentry_open); + +_ diff --git a/lustre/kernel_patches/pc/exports_hp_2.4.20.pc b/lustre/kernel_patches/pc/exports_hp_2.4.20.pc new file mode 100644 index 0000000..6472a11 --- /dev/null +++ b/lustre/kernel_patches/pc/exports_hp_2.4.20.pc @@ -0,0 +1,4 @@ +fs/ext3/Makefile +fs/ext3/super.c +include/linux/fs.h +kernel/ksyms.c -- 1.8.3.1