[PVFS-developers] Re: pvfs 1.6.2 on old 2.4 kernel?

Robert Latham robl@mcs.anl.gov
Tue Feb 3 17:07:24 EST 2004


--9s922KAXlWjPfK/Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Feb 03, 2004 at 01:31:54PM +0200, meltzer@zib.de wrote:
> The header seq_file.h is missing in the includes of 2.4.9 kernel.

Here's a patch that might do the trick.  It sees if 'linux/seq_file.h'
is on your system, and if so, gives you 'pvfs_show_options' support.
If you are running on an older kernel w/o linux/seq_file.h, then
pvfs_show_options won't be used.  

Please test this and let me know if it works for you.  It modifies
configure.in, so please run 'autoconf' and 'autoheader' after applying
the attached patch.

Thanks for the bug report.
==rob

-- 
Rob Latham
Mathematics and Computer Science Division    A215 0178 EA2D B059 8CDF
Argonne National Labs, IL USA                B29D F333 664A 4280 315B

--9s922KAXlWjPfK/Q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="seq_file.patch"

Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pvfs-kernel/configure.in,v
retrieving revision 1.86
diff -u -w -p -r1.86 configure.in
--- configure.in	2 Dec 2003 22:02:26 -0000	1.86
+++ configure.in	3 Feb 2004 17:03:23 -0000
@@ -245,7 +245,7 @@ LD_FLAGS="$LDFLAGS_OLD"
 
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h sys/time.h unistd.h linux/posix_types.h linux/slab.h linux/tqueue.h linux/vmalloc.h linux/pagemap.h linux/locks.h linux/smp_lock.h linux/highmem.h linux/modversions.h linux/malloc.h linux/init.h) 
+AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h sys/time.h unistd.h linux/posix_types.h linux/slab.h linux/tqueue.h linux/vmalloc.h linux/pagemap.h linux/locks.h linux/smp_lock.h linux/highmem.h linux/modversions.h linux/malloc.h linux/init.h linux/seq_file.h) 
 
 dnl Checks for conflicts with compiler includes
 AC_MSG_CHECKING(for sane compiler includes)
Index: inode.c
===================================================================
RCS file: /projects/cvsroot/pvfs-kernel/inode.c,v
retrieving revision 1.49
diff -u -w -p -r1.49 inode.c
--- inode.c	16 Oct 2003 15:43:43 -0000	1.49
+++ inode.c	3 Feb 2004 17:03:23 -0000
@@ -28,8 +28,10 @@
 #include "pvfs_kernel_config.h"
 
 #include <linux/locks.h>
-#include <linux/seq_file.h>
 #include <asm/uaccess.h>
+#ifdef HAVE_LINUX_SEQ_FILE_H
+#include <linux/seq_file>
+#endif
 
 #include "pvfs_linux.h"
 #include "pvfs_mount.h"
@@ -42,7 +44,9 @@ static void pvfs_read_inode(struct inode
 static void pvfs_clear_inode(struct inode *);
 static void pvfs_put_super(struct super_block *);
 static int pvfs_statfs(struct super_block *sb, struct statfs *buf);
+#ifdef HAVE_LINUX_SEQ_FILE_H
 static int  pvfs_show_options(struct seq_file *m, struct vfsmount *mnt);
+#endif
 
 struct super_operations pvfs_super_operations =
 {
@@ -51,7 +55,9 @@ struct super_operations pvfs_super_opera
 	clear_inode:   pvfs_clear_inode,
 	put_super:     pvfs_put_super,
 	statfs:        pvfs_statfs,
+#ifdef HAVE_LINUX_SEQ_FILE_H
 	show_options:  pvfs_show_options,
+#endif
 };
 
 /* iattr_to_pvfs_meta()
@@ -410,6 +416,7 @@ static struct inode *pvfs_super_iget(str
 }
 
 
+#ifdef HAVE_LINUX_SEQ_FILE_H
 /* show the PVFS mount options currently in-use */
 static int  pvfs_show_options(struct seq_file *m, struct vfsmount *mnt)
 {
@@ -439,6 +446,7 @@ static int  pvfs_show_options(struct seq
    seq_escape(m, sb->mgr, " \t\n\\");
    return 0;
 }
+#endif
 
 
 /*

--9s922KAXlWjPfK/Q--



More information about the PVFS-developers mailing list