linux-ext3-adds-items-to-struct-inode-and-so-do-we-20010807
authorDerrick Brashear <shadow@dementia.org>
Wed, 8 Aug 2001 03:37:54 +0000 (03:37 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 8 Aug 2001 03:37:54 +0000 (03:37 +0000)
Thanks to shirsch@adelphia.net for mentioning something was added.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

this leaked in, separate delta

====================

fix maxcro defn

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

index 548d496..95ed141 100644 (file)
@@ -31,6 +31,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #undef INODE_SETATTR_NOT_VOID
 #undef STRUCT_INODE_HAS_I_BYTES
 #undef STRUCT_INODE_HAS_I_CDEV
+#undef STRUCT_INODE_HAS_I_TRUNCATE_SEM
 #undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
 
 /* glue for RedHat kernel bug */
index e0ae300..3313675 100644 (file)
@@ -112,6 +112,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_TRUNCATE_SEM
                 LINUX_INODE_SETATTR_RETURN_TYPE
                 LINUX_NEED_RHCONFIG
                 LINUX_WHICH_MODULES
@@ -121,6 +122,9 @@ case $system in
                 if test "x$ac_cv_linux_fs_struct_inode_has_i_cdev" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_CDEV)
                 fi
+                if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then 
+                 AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM)
+                fi
                 if test "x$ac_cv_linux_fs_struct_inode_has_i_bytes" = "xyes"; then 
                  AC_DEFINE(STRUCT_INODE_HAS_I_BYTES)
                 fi
index 30d14fc..e390f6a 100644 (file)
@@ -54,6 +54,9 @@ typedef struct vnode {
         unsigned short          i_bytes;
 #endif
        struct semaphore        i_sem;
+#ifdef STRUCT_INODE_HAS_I_TRUNCATE_SEM
+        struct rw_semaphore     i_truncate_sem;
+#endif
 #if defined(AFS_LINUX24_ENV)
         struct semaphore        i_zombie;
 #else
index 1755b31..de9c468 100644 (file)
@@ -12,3 +12,18 @@ ac_cv_linux_fs_struct_inode_has_i_cdev=yes,
 ac_cv_linux_fs_struct_inode_has_i_cdev=no)])
 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_cdev)
 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"
+CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
+AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_truncate_sem, 
+[
+AC_TRY_COMPILE(
+[#include <linux/fs.h>],
+[struct inode _inode;
+printf("%d\n", _inode.i_truncate_sem);], 
+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"])