linux-support-kernel-patches-used-by-suse-20010829
authorDerrick Brashear <shadow@dementia.org>
Wed, 29 Aug 2001 20:04:00 +0000 (20:04 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 29 Aug 2001 20:04:00 +0000 (20:04 +0000)
check for added fields in struct inode

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

index 95ed141..1045f52 100644 (file)
@@ -32,6 +32,8 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #undef STRUCT_INODE_HAS_I_BYTES
 #undef STRUCT_INODE_HAS_I_CDEV
 #undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
+#undef STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS
+#undef STRUCT_INODE_HAS_I_MAPPING_OVERLOAD
 #undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
 
 /* glue for RedHat kernel bug */
index 0dedc8b..9c54c73 100644 (file)
@@ -113,12 +113,20 @@ case $system in
                 LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
                 LINUX_FS_STRUCT_INODE_HAS_I_CDEV
                 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
                 LINUX_INODE_SETATTR_RETURN_TYPE
                 LINUX_NEED_RHCONFIG
                 LINUX_WHICH_MODULES
                 if test "x$ac_cv_linux_func_inode_setattr_returns_int" = "xyes" ; then
                  AC_DEFINE(INODE_SETATTR_NOT_VOID)
                 fi
+                if test "x$ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers" = "xyes"; then 
+                 AC_DEFINE(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS)
+                fi
+                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_cdev" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_CDEV)
                 fi
index e390f6a..f973054 100644 (file)
@@ -28,6 +28,9 @@ typedef struct vnode {
 #if defined(AFS_LINUX24_ENV)
         struct list_head        i_dirty_buffers;
 #endif
+#if defined(STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS)
+        struct list_head        i_dirty_data_buffers;
+#endif
        unsigned long           i_ino;
        unsigned int            i_count;
        kdev_t                  i_dev;
@@ -80,6 +83,9 @@ typedef struct vnode {
        struct vm_area_struct   *i_mmap;
        struct page             *i_pages;
 #endif
+#if defined(STRUCT_INODE_HAS_I_MAPPING_OVERLOAD)
+        int                     i_mapping_overload;
+#endif
        struct dquot            *i_dquot[MAXQUOTAS];
 #if defined(AFS_LINUX24_ENV)
         struct pipe_inode_info  *i_pipe;
index de9c468..cc2a8bc 100644 (file)
@@ -1,3 +1,33 @@
+AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS, [
+AC_MSG_CHECKING(for i_dirty_data_buffers 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_dirty_data_buffers, 
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+printf("%d\n", _inode.i_dirty_data_buffers);], 
+ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes,
+ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no)])
+AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers)
+CPPFLAGS="$save_CPPFLAGS"])
+
+AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD, [
+AC_MSG_CHECKING(for i_mapping_overload 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_mapping_overload, 
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+printf("%d\n", _inode.i_mapping_overload);], 
+ac_cv_linux_fs_struct_inode_has_i_mapping_overload=yes,
+ac_cv_linux_fs_struct_inode_has_i_mapping_overload=no)])
+AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mapping_overload)
+CPPFLAGS="$save_CPPFLAGS"])
+
 AC_DEFUN(LINUX_FS_STRUCT_INODE_HAS_I_CDEV, [
 AC_MSG_CHECKING(for i_cdev in struct inode)
 save_CPPFLAGS="$CPPFLAGS"