linux24-another-new-inode-field-sigh-20011001
authorMark W. Eichin <eichin-oa@boxedpenguin.com>
Mon, 1 Oct 2001 18:31:49 +0000 (18:31 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 1 Oct 2001 18:31:49 +0000 (18:31 +0000)
with configure glue by shadow@dementia.org

one of these days we really need to implement a better solution

acconfig.h
configure-libafs.in
configure.in
src/afs/LINUX/osi_vfs.h
src/cf/linux-test4.m4

index 12ef98b..38198b4 100644 (file)
@@ -29,13 +29,14 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #undef FULL_LISTVOL_SWITCH
 
 #undef INODE_SETATTR_NOT_VOID
+#undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
 #undef STRUCT_INODE_HAS_I_BYTES
 #undef STRUCT_INODE_HAS_I_CDEV
-#undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
+#undef STRUCT_INODE_HAS_I_DEVICES
 #undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
 #undef STRUCT_INODE_HAS_I_MAPPING_OVERLOAD
 #undef STRUCT_INODE_HAS_I_MMAP_SHARED
-#undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+#undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
 
 /* glue for RedHat kernel bug */
 #undef ENABLE_REDHAT_BUILDSYS
index 0529412..f337340 100644 (file)
@@ -115,6 +115,7 @@ case $system in
                 LINUX_FS_STRUCT_INODE_HAS_I_BYTES
                 LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
                 LINUX_FS_STRUCT_INODE_HAS_I_CDEV
+                LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
                 LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
                 LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
                 LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD
@@ -134,6 +135,9 @@ case $system in
                 if test "x$ac_cv_linux_fs_struct_inode_has_i_mapping_overload" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_MAPPING_OVERLOAD)
                 fi
+                if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then 
+                 AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES)
+                fi
                 if test "x$ac_cv_linux_fs_struct_inode_has_i_cdev" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_CDEV)
                 fi
index f858aee..f9f74e7 100644 (file)
@@ -115,6 +115,7 @@ case $system in
                 LINUX_FS_STRUCT_INODE_HAS_I_BYTES
                 LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
                 LINUX_FS_STRUCT_INODE_HAS_I_CDEV
+                LINUX_FS_STRUCT_INODE_HAS_I_DEVICES
                 LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
                 LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
                 LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD
@@ -134,6 +135,9 @@ case $system in
                 if test "x$ac_cv_linux_fs_struct_inode_has_i_mapping_overload" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_MAPPING_OVERLOAD)
                 fi
+                if test "x$ac_cv_linux_fs_struct_inode_has_i_devices" = "xyes"; then 
+                 AC_DEFINE(STRUCT_INODE_HAS_I_DEVICES)
+                fi
                 if test "x$ac_cv_linux_fs_struct_inode_has_i_cdev" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_CDEV)
                 fi
index b5f92e1..962e3b1 100644 (file)
@@ -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)
index ae22e13..98ad569 100644 (file)
@@ -72,3 +72,19 @@ ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes,
 ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no)])
 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_truncate_sem)
 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"])
+