aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ext4_fs_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ext4_fs_i.h')
-rw-r--r--include/linux/ext4_fs_i.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/include/linux/ext4_fs_i.h b/include/linux/ext4_fs_i.h
index 86ddfe2089f3..d5508d3cf290 100644
--- a/include/linux/ext4_fs_i.h
+++ b/include/linux/ext4_fs_i.h
@@ -27,6 +27,12 @@ typedef int ext4_grpblk_t;
27/* data type for filesystem-wide blocks number */ 27/* data type for filesystem-wide blocks number */
28typedef unsigned long long ext4_fsblk_t; 28typedef unsigned long long ext4_fsblk_t;
29 29
30/* data type for file logical block number */
31typedef __u32 ext4_lblk_t;
32
33/* data type for block group number */
34typedef unsigned long ext4_group_t;
35
30struct ext4_reserve_window { 36struct ext4_reserve_window {
31 ext4_fsblk_t _rsv_start; /* First byte reserved */ 37 ext4_fsblk_t _rsv_start; /* First byte reserved */
32 ext4_fsblk_t _rsv_end; /* Last byte reserved or 0 */ 38 ext4_fsblk_t _rsv_end; /* Last byte reserved or 0 */
@@ -48,7 +54,7 @@ struct ext4_block_alloc_info {
48 * most-recently-allocated block in this file. 54 * most-recently-allocated block in this file.
49 * We use this for detecting linearly ascending allocation requests. 55 * We use this for detecting linearly ascending allocation requests.
50 */ 56 */
51 __u32 last_alloc_logical_block; 57 ext4_lblk_t last_alloc_logical_block;
52 /* 58 /*
53 * Was i_next_alloc_goal in ext4_inode_info 59 * Was i_next_alloc_goal in ext4_inode_info
54 * is the *physical* companion to i_next_alloc_block. 60 * is the *physical* companion to i_next_alloc_block.
@@ -67,7 +73,7 @@ struct ext4_block_alloc_info {
67 */ 73 */
68struct ext4_ext_cache { 74struct ext4_ext_cache {
69 ext4_fsblk_t ec_start; 75 ext4_fsblk_t ec_start;
70 __u32 ec_block; 76 ext4_lblk_t ec_block;
71 __u32 ec_len; /* must be 32bit to return holes */ 77 __u32 ec_len; /* must be 32bit to return holes */
72 __u32 ec_type; 78 __u32 ec_type;
73}; 79};
@@ -79,7 +85,6 @@ struct ext4_inode_info {
79 __le32 i_data[15]; /* unconverted */ 85 __le32 i_data[15]; /* unconverted */
80 __u32 i_flags; 86 __u32 i_flags;
81 ext4_fsblk_t i_file_acl; 87 ext4_fsblk_t i_file_acl;
82 __u32 i_dir_acl;
83 __u32 i_dtime; 88 __u32 i_dtime;
84 89
85 /* 90 /*
@@ -89,13 +94,13 @@ struct ext4_inode_info {
89 * place a file's data blocks near its inode block, and new inodes 94 * place a file's data blocks near its inode block, and new inodes
90 * near to their parent directory's inode. 95 * near to their parent directory's inode.
91 */ 96 */
92 __u32 i_block_group; 97 ext4_group_t i_block_group;
93 __u32 i_state; /* Dynamic state flags for ext4 */ 98 __u32 i_state; /* Dynamic state flags for ext4 */
94 99
95 /* block reservation info */ 100 /* block reservation info */
96 struct ext4_block_alloc_info *i_block_alloc_info; 101 struct ext4_block_alloc_info *i_block_alloc_info;
97 102
98 __u32 i_dir_start_lookup; 103 ext4_lblk_t i_dir_start_lookup;
99#ifdef CONFIG_EXT4DEV_FS_XATTR 104#ifdef CONFIG_EXT4DEV_FS_XATTR
100 /* 105 /*
101 * Extended attributes can be read independently of the main file 106 * Extended attributes can be read independently of the main file
@@ -134,16 +139,16 @@ struct ext4_inode_info {
134 __u16 i_extra_isize; 139 __u16 i_extra_isize;
135 140
136 /* 141 /*
137 * truncate_mutex is for serialising ext4_truncate() against 142 * i_data_sem is for serialising ext4_truncate() against
138 * ext4_getblock(). In the 2.4 ext2 design, great chunks of inode's 143 * ext4_getblock(). In the 2.4 ext2 design, great chunks of inode's
139 * data tree are chopped off during truncate. We can't do that in 144 * data tree are chopped off during truncate. We can't do that in
140 * ext4 because whenever we perform intermediate commits during 145 * ext4 because whenever we perform intermediate commits during
141 * truncate, the inode and all the metadata blocks *must* be in a 146 * truncate, the inode and all the metadata blocks *must* be in a
142 * consistent state which allows truncation of the orphans to restart 147 * consistent state which allows truncation of the orphans to restart
143 * during recovery. Hence we must fix the get_block-vs-truncate race 148 * during recovery. Hence we must fix the get_block-vs-truncate race
144 * by other means, so we have truncate_mutex. 149 * by other means, so we have i_data_sem.
145 */ 150 */
146 struct mutex truncate_mutex; 151 struct rw_semaphore i_data_sem;
147 struct inode vfs_inode; 152 struct inode vfs_inode;
148 153
149 unsigned long i_ext_generation; 154 unsigned long i_ext_generation;
@@ -153,6 +158,10 @@ struct ext4_inode_info {
153 * struct timespec i_{a,c,m}time in the generic inode. 158 * struct timespec i_{a,c,m}time in the generic inode.
154 */ 159 */
155 struct timespec i_crtime; 160 struct timespec i_crtime;
161
162 /* mballoc */
163 struct list_head i_prealloc_list;
164 spinlock_t i_prealloc_lock;
156}; 165};
157 166
158#endif /* _LINUX_EXT4_FS_I */ 167#endif /* _LINUX_EXT4_FS_I */