diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2008-01-28 23:58:27 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-01-28 23:58:27 -0500 |
commit | 725d26d3f09ccb5bac4b4293096b985a312a0d67 (patch) | |
tree | 1c49a07da252832fc6842c88a2359e8cd43af636 /include/linux/ext4_fs_i.h | |
parent | a72d7f834e1afa08421938d7eb06bd8e56b0e58c (diff) |
ext4: Introduce ext4_lblk_t
This patch adds a new data type ext4_lblk_t to represent
the logical file blocks.
This is the preparatory patch to support large files in ext4
The follow up patch with convert the ext4_inode i_blocks to
represent the number of blocks in file system block size. This
changes makes it possible to have a block number 2**32 -1 which
will result in overflow if the block number is represented by
signed long. This patch convert all the block number to type
ext4_lblk_t which is typedef to __u32
Also remove dead code ext4_ext_walk_space
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'include/linux/ext4_fs_i.h')
-rw-r--r-- | include/linux/ext4_fs_i.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/ext4_fs_i.h b/include/linux/ext4_fs_i.h index 86ddfe2089f3..6c610b67b047 100644 --- a/include/linux/ext4_fs_i.h +++ b/include/linux/ext4_fs_i.h | |||
@@ -27,6 +27,9 @@ typedef int ext4_grpblk_t; | |||
27 | /* data type for filesystem-wide blocks number */ | 27 | /* data type for filesystem-wide blocks number */ |
28 | typedef unsigned long long ext4_fsblk_t; | 28 | typedef unsigned long long ext4_fsblk_t; |
29 | 29 | ||
30 | /* data type for file logical block number */ | ||
31 | typedef __u32 ext4_lblk_t; | ||
32 | |||
30 | struct ext4_reserve_window { | 33 | struct ext4_reserve_window { |
31 | ext4_fsblk_t _rsv_start; /* First byte reserved */ | 34 | ext4_fsblk_t _rsv_start; /* First byte reserved */ |
32 | ext4_fsblk_t _rsv_end; /* Last byte reserved or 0 */ | 35 | ext4_fsblk_t _rsv_end; /* Last byte reserved or 0 */ |
@@ -48,7 +51,7 @@ struct ext4_block_alloc_info { | |||
48 | * most-recently-allocated block in this file. | 51 | * most-recently-allocated block in this file. |
49 | * We use this for detecting linearly ascending allocation requests. | 52 | * We use this for detecting linearly ascending allocation requests. |
50 | */ | 53 | */ |
51 | __u32 last_alloc_logical_block; | 54 | ext4_lblk_t last_alloc_logical_block; |
52 | /* | 55 | /* |
53 | * Was i_next_alloc_goal in ext4_inode_info | 56 | * Was i_next_alloc_goal in ext4_inode_info |
54 | * is the *physical* companion to i_next_alloc_block. | 57 | * is the *physical* companion to i_next_alloc_block. |
@@ -67,7 +70,7 @@ struct ext4_block_alloc_info { | |||
67 | */ | 70 | */ |
68 | struct ext4_ext_cache { | 71 | struct ext4_ext_cache { |
69 | ext4_fsblk_t ec_start; | 72 | ext4_fsblk_t ec_start; |
70 | __u32 ec_block; | 73 | ext4_lblk_t ec_block; |
71 | __u32 ec_len; /* must be 32bit to return holes */ | 74 | __u32 ec_len; /* must be 32bit to return holes */ |
72 | __u32 ec_type; | 75 | __u32 ec_type; |
73 | }; | 76 | }; |
@@ -95,7 +98,7 @@ struct ext4_inode_info { | |||
95 | /* block reservation info */ | 98 | /* block reservation info */ |
96 | struct ext4_block_alloc_info *i_block_alloc_info; | 99 | struct ext4_block_alloc_info *i_block_alloc_info; |
97 | 100 | ||
98 | __u32 i_dir_start_lookup; | 101 | ext4_lblk_t i_dir_start_lookup; |
99 | #ifdef CONFIG_EXT4DEV_FS_XATTR | 102 | #ifdef CONFIG_EXT4DEV_FS_XATTR |
100 | /* | 103 | /* |
101 | * Extended attributes can be read independently of the main file | 104 | * Extended attributes can be read independently of the main file |