diff options
author | Eric Sandeen <sandeen@redhat.com> | 2009-08-25 22:36:45 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-08-25 22:36:45 -0400 |
commit | a36b44988cef1fc007535107013571fa691a2d7f (patch) | |
tree | b9d659b8ac2a1068f6fbc08ac093902333512c70 /fs/ext4/mballoc.h | |
parent | 1927805e6599d8602d2c0af6a0155c85acc0b214 (diff) |
ext4: use ext4_grpblk_t more extensively
unsigned short is potentially too small to track blocks within
a group; today it is safe due to restrictions in e2fsprogs but
we have _lo / _hi bits for group blocks with the intent to go
up to 32 bits, so clean this up now.
There are many more places where we use unsigned/int/unsigned int
to contain a group block but this should at least fix all the
short types.
I added a few comments to the struct ext4_group_info definition
as well.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/mballoc.h')
-rw-r--r-- | fs/ext4/mballoc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 9db890d4d275..188d3d709b24 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h | |||
@@ -136,8 +136,8 @@ struct ext4_prealloc_space { | |||
136 | unsigned pa_deleted; | 136 | unsigned pa_deleted; |
137 | ext4_fsblk_t pa_pstart; /* phys. block */ | 137 | ext4_fsblk_t pa_pstart; /* phys. block */ |
138 | ext4_lblk_t pa_lstart; /* log. block */ | 138 | ext4_lblk_t pa_lstart; /* log. block */ |
139 | unsigned short pa_len; /* len of preallocated chunk */ | 139 | ext4_grpblk_t pa_len; /* len of preallocated chunk */ |
140 | unsigned short pa_free; /* how many blocks are free */ | 140 | ext4_grpblk_t pa_free; /* how many blocks are free */ |
141 | unsigned short pa_type; /* pa type. inode or group */ | 141 | unsigned short pa_type; /* pa type. inode or group */ |
142 | spinlock_t *pa_obj_lock; | 142 | spinlock_t *pa_obj_lock; |
143 | struct inode *pa_inode; /* hack, for history only */ | 143 | struct inode *pa_inode; /* hack, for history only */ |
@@ -152,7 +152,7 @@ struct ext4_free_extent { | |||
152 | ext4_lblk_t fe_logical; | 152 | ext4_lblk_t fe_logical; |
153 | ext4_grpblk_t fe_start; | 153 | ext4_grpblk_t fe_start; |
154 | ext4_group_t fe_group; | 154 | ext4_group_t fe_group; |
155 | int fe_len; | 155 | ext4_grpblk_t fe_len; |
156 | }; | 156 | }; |
157 | 157 | ||
158 | /* | 158 | /* |