]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ext4_fs_i.h
Memory controller: cgroups setup
[linux-2.6-omap-h63xx.git] / include / linux / ext4_fs_i.h
index d5b177e5b3958338d13bfc46a9d8fcc1e338a9ee..d5508d3cf29096db958efa7be8719d69fb155ac0 100644 (file)
@@ -27,6 +27,12 @@ typedef int ext4_grpblk_t;
 /* data type for filesystem-wide blocks number */
 typedef unsigned long long ext4_fsblk_t;
 
+/* data type for file logical block number */
+typedef __u32 ext4_lblk_t;
+
+/* data type for block group number */
+typedef unsigned long ext4_group_t;
+
 struct ext4_reserve_window {
        ext4_fsblk_t    _rsv_start;     /* First byte reserved */
        ext4_fsblk_t    _rsv_end;       /* Last byte reserved or 0 */
@@ -41,14 +47,14 @@ struct ext4_reserve_window_node {
 
 struct ext4_block_alloc_info {
        /* information about reservation window */
-       struct ext4_reserve_window_node rsv_window_node;
+       struct ext4_reserve_window_node rsv_window_node;
        /*
         * was i_next_alloc_block in ext4_inode_info
         * is the logical (file-relative) number of the
         * most-recently-allocated block in this file.
         * We use this for detecting linearly ascending allocation requests.
         */
-       __u32                   last_alloc_logical_block;
+       ext4_lblk_t last_alloc_logical_block;
        /*
         * Was i_next_alloc_goal in ext4_inode_info
         * is the *physical* companion to i_next_alloc_block.
@@ -56,7 +62,7 @@ struct ext4_block_alloc_info {
         * allocated to this file.  This give us the goal (target) for the next
         * allocation when we detect linearly ascending requests.
         */
-       ext4_fsblk_t            last_alloc_physical_block;
+       ext4_fsblk_t last_alloc_physical_block;
 };
 
 #define rsv_start rsv_window._rsv_start
@@ -67,7 +73,7 @@ struct ext4_block_alloc_info {
  */
 struct ext4_ext_cache {
        ext4_fsblk_t    ec_start;
-       __u32           ec_block;
+       ext4_lblk_t     ec_block;
        __u32           ec_len; /* must be 32bit to return holes */
        __u32           ec_type;
 };
@@ -78,13 +84,7 @@ struct ext4_ext_cache {
 struct ext4_inode_info {
        __le32  i_data[15];     /* unconverted */
        __u32   i_flags;
-#ifdef EXT4_FRAGMENTS
-       __u32   i_faddr;
-       __u8    i_frag_no;
-       __u8    i_frag_size;
-#endif
        ext4_fsblk_t    i_file_acl;
-       __u32   i_dir_acl;
        __u32   i_dtime;
 
        /*
@@ -94,13 +94,13 @@ struct ext4_inode_info {
         * place a file's data blocks near its inode block, and new inodes
         * near to their parent directory's inode.
         */
-       __u32   i_block_group;
+       ext4_group_t    i_block_group;
        __u32   i_state;                /* Dynamic state flags for ext4 */
 
        /* block reservation info */
        struct ext4_block_alloc_info *i_block_alloc_info;
 
-       __u32   i_dir_start_lookup;
+       ext4_lblk_t             i_dir_start_lookup;
 #ifdef CONFIG_EXT4DEV_FS_XATTR
        /*
         * Extended attributes can be read independently of the main file
@@ -139,20 +139,29 @@ struct ext4_inode_info {
        __u16 i_extra_isize;
 
        /*
-        * truncate_mutex is for serialising ext4_truncate() against
+        * i_data_sem is for serialising ext4_truncate() against
         * ext4_getblock().  In the 2.4 ext2 design, great chunks of inode's
         * data tree are chopped off during truncate. We can't do that in
         * ext4 because whenever we perform intermediate commits during
         * truncate, the inode and all the metadata blocks *must* be in a
         * consistent state which allows truncation of the orphans to restart
         * during recovery.  Hence we must fix the get_block-vs-truncate race
-        * by other means, so we have truncate_mutex.
+        * by other means, so we have i_data_sem.
         */
-       struct mutex truncate_mutex;
+       struct rw_semaphore i_data_sem;
        struct inode vfs_inode;
 
        unsigned long i_ext_generation;
        struct ext4_ext_cache i_cached_extent;
+       /*
+        * File creation time. Its function is same as that of
+        * struct timespec i_{a,c,m}time in the generic inode.
+        */
+       struct timespec i_crtime;
+
+       /* mballoc */
+       struct list_head i_prealloc_list;
+       spinlock_t i_prealloc_lock;
 };
 
 #endif /* _LINUX_EXT4_FS_I */