linux-fs-h-struct-inode-test-for-i-cdev-20010807
[openafs.git] / src / afs / LINUX / osi_vfs.h
index a871e98..30d14fc 100644 (file)
@@ -1,7 +1,13 @@
-/* Copyright 1998 Transarc Corporation - All Rights Reserved.
- *
- * osi_vfs.h
- *
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+/*
  * Linux interpretations of vnode and vfs structs.
  *
  * The Linux "inode" has been abstracted to the fs independent part to avoid
@@ -19,7 +25,9 @@ typedef struct vnode {
        struct list_head        i_hash;
        struct list_head        i_list;
        struct list_head        i_dentry;
-
+#if defined(AFS_LINUX24_ENV)
+        struct list_head        i_dirty_buffers;
+#endif
        unsigned long           i_ino;
        unsigned int            i_count;
        kdev_t                  i_dev;
@@ -28,31 +36,71 @@ typedef struct vnode {
        uid_t                   i_uid;
        gid_t                   i_gid;
        kdev_t                  i_rdev;
+#if defined(AFS_LINUX24_ENV) || defined(pgoff2loff) 
+        loff_t                  i_size;
+#else
        off_t                   i_size;
+#endif
        time_t                  i_atime;
        time_t                  i_mtime;
        time_t                  i_ctime;
        unsigned long           i_blksize;
        unsigned long           i_blocks;
        unsigned long           i_version;
+#if !defined(AFS_LINUX24_ENV)
        unsigned long           i_nrpages;
+#endif
+#ifdef STRUCT_INODE_HAS_I_BYTES
+        unsigned short          i_bytes;
+#endif
        struct semaphore        i_sem;
+#if defined(AFS_LINUX24_ENV)
+        struct semaphore        i_zombie;
+#else
        struct semaphore        i_atomic_write;
+#endif
        struct inode_operations *i_op;
+#if defined(AFS_LINUX24_ENV)
+        struct file_operations  *i_fop;
+#endif
        struct super_block      *i_sb;
+#if defined(AFS_LINUX24_ENV)
+        wait_queue_head_t       i_wait;
+#else
        struct wait_queue       *i_wait;
+#endif
        struct file_lock        *i_flock;
+#if defined(AFS_LINUX24_ENV)
+        struct address_space    *i_mapping;
+        struct address_space    i_data;
+#else
        struct vm_area_struct   *i_mmap;
        struct page             *i_pages;
+#endif
        struct dquot            *i_dquot[MAXQUOTAS];
+#if defined(AFS_LINUX24_ENV)
+        struct pipe_inode_info  *i_pipe;
+        struct block_device     *i_bdev;
+#if defined(STRUCT_INODE_HAS_I_CDEV)
+        struct char_device      *i_cdev;
+#endif
+        unsigned long           i_dnotify_mask;
+        struct dnotify_struct   *i_dnotify;
+#endif
 
        unsigned long           i_state;
 
        unsigned int            i_flags;
+#if !defined(AFS_LINUX24_ENV)
        unsigned char           i_pipe;
+#endif
        unsigned char           i_sock;
 
+#if defined(AFS_LINUX24_ENV)
+        atomic_t                i_writecount;
+#else
        int                     i_writecount;
+#endif
        unsigned int            i_attr_flags;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,10)
        __u32                   i_generation;
@@ -87,6 +135,9 @@ typedef struct vnode {
 #define i_number       i_ino
 #define v_count                i_count
 #define v_op           i_op
+#if defined(AFS_LINUX24_ENV)
+#define v_fop           i_fop
+#endif
 #define v_type         i_mode
 #define v_vfsp         i_sb
 #define vfs_vnodecovered s_covered