[OpenAFS] Linux 2.4.10 changes

eichin-oa@boxedpenguin.com eichin-oa@boxedpenguin.com
01 Oct 2001 11:50:40 -0400


alternatively if one wants to (1) preserve the existing style (2)
continue to work on previous 2.4.x platforms, it is simple to mimic
other struct inode element patches as follows (off of 1.2.1, doesn't
appear to be in CVS yet.)

diff -uwrp modules/openafs/src/afs/LINUX/osi_vfs.h ../modules/openafs/src/afs/LINUX/osi_vfs.h
--- modules/openafs/src/afs/LINUX/osi_vfs.h	Tue Sep 11 10:25:07 2001
+++ ../modules/openafs/src/afs/LINUX/osi_vfs.h	Mon Oct  1 11:20:20 2001
@@ -91,6 +91,9 @@ typedef struct vnode {
 #endif
 	struct dquot		*i_dquot[MAXQUOTAS];
 #if defined(AFS_LINUX24_ENV)
+#if defined(STRUCT_INODE_HAS_I_DEVICES)
+	struct list_head	i_devices;
+#endif
         struct pipe_inode_info  *i_pipe;
         struct block_device     *i_bdev;
 #if defined(STRUCT_INODE_HAS_I_CDEV)
diff -uwrp modules/openafs/src/cf/linux-test4.m4 ../modules/openafs/src/cf/linux-test4.m4
--- modules/openafs/src/cf/linux-test4.m4	Tue Sep 11 10:31:58 2001
+++ ../modules/openafs/src/cf/linux-test4.m4	Mon Oct  1 11:20:55 2001
@@ -58,6 +58,21 @@ ac_cv_linux_fs_struct_inode_has_i_cdev=n
 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_cdev)
 CPPFLAGS="$save_CPPFLAGS"])
 
+AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DEVICES, [
+AC_MSG_CHECKING(for i_devices in struct inode)
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+printf("%d\n", _inode.i_devices);], 
+ac_cv_linux_fs_struct_inode_has_i_devices=yes,
+ac_cv_linux_fs_struct_inode_has_i_devices=no)])
+AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_devices)
+CPPFLAGS="$save_CPPFLAGS"])
+
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM, [
 AC_MSG_CHECKING(for i_truncate_sem in struct inode)
 save_CPPFLAGS="$CPPFLAGS"
--- modules/openafs/src/config/afsconfig.h.in	Tue Sep 11 18:09:38 2001
+++ ../modules/openafs/src/config/afsconfig.h.in	Mon Oct  1 11:20:36 2001
@@ -213,6 +213,7 @@ static /**/const char *const rcsid[] = {
 
 #undef INODE_SETATTR_NOT_VOID
 #undef STRUCT_INODE_HAS_I_BYTES
+#undef STRUCT_INODE_HAS_I_DEVICES
 #undef STRUCT_INODE_HAS_I_CDEV
 #undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
 #undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS