diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2009-01-05 22:20:24 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-01-05 22:20:24 -0500 |
commit | 560671a0d3c9ad2d647fa6d09375a262e1f19c4f (patch) | |
tree | a52673326726062d53b35643d51a16739cd804fc /fs/ext4/ext4.h | |
parent | e8134b27e351e813414da3b95aa8eac6d3908088 (diff) |
ext4: Use high 16 bits of the block group descriptor's free counts fields
Rename the lower bits with suffix _lo and add helper
to access the values. Also rename bg_itable_unused_hi
to bg_pad as in e2fsprogs.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index f0b1db6acf85..ec862f4ca89f 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -156,12 +156,12 @@ struct ext4_group_desc | |||
156 | __le32 bg_block_bitmap_lo; /* Blocks bitmap block */ | 156 | __le32 bg_block_bitmap_lo; /* Blocks bitmap block */ |
157 | __le32 bg_inode_bitmap_lo; /* Inodes bitmap block */ | 157 | __le32 bg_inode_bitmap_lo; /* Inodes bitmap block */ |
158 | __le32 bg_inode_table_lo; /* Inodes table block */ | 158 | __le32 bg_inode_table_lo; /* Inodes table block */ |
159 | __le16 bg_free_blocks_count; /* Free blocks count */ | 159 | __le16 bg_free_blocks_count_lo;/* Free blocks count */ |
160 | __le16 bg_free_inodes_count; /* Free inodes count */ | 160 | __le16 bg_free_inodes_count_lo;/* Free inodes count */ |
161 | __le16 bg_used_dirs_count; /* Directories count */ | 161 | __le16 bg_used_dirs_count_lo; /* Directories count */ |
162 | __le16 bg_flags; /* EXT4_BG_flags (INODE_UNINIT, etc) */ | 162 | __le16 bg_flags; /* EXT4_BG_flags (INODE_UNINIT, etc) */ |
163 | __u32 bg_reserved[2]; /* Likely block/inode bitmap checksum */ | 163 | __u32 bg_reserved[2]; /* Likely block/inode bitmap checksum */ |
164 | __le16 bg_itable_unused; /* Unused inodes count */ | 164 | __le16 bg_itable_unused_lo; /* Unused inodes count */ |
165 | __le16 bg_checksum; /* crc16(sb_uuid+group+desc) */ | 165 | __le16 bg_checksum; /* crc16(sb_uuid+group+desc) */ |
166 | __le32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */ | 166 | __le32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */ |
167 | __le32 bg_inode_bitmap_hi; /* Inodes bitmap block MSB */ | 167 | __le32 bg_inode_bitmap_hi; /* Inodes bitmap block MSB */ |
@@ -169,7 +169,7 @@ struct ext4_group_desc | |||
169 | __le16 bg_free_blocks_count_hi;/* Free blocks count MSB */ | 169 | __le16 bg_free_blocks_count_hi;/* Free blocks count MSB */ |
170 | __le16 bg_free_inodes_count_hi;/* Free inodes count MSB */ | 170 | __le16 bg_free_inodes_count_hi;/* Free inodes count MSB */ |
171 | __le16 bg_used_dirs_count_hi; /* Directories count MSB */ | 171 | __le16 bg_used_dirs_count_hi; /* Directories count MSB */ |
172 | __le16 bg_itable_unused_hi; /* Unused inodes count MSB */ | 172 | __le16 bg_itable_unused_hi; /* Unused inodes count MSB */ |
173 | __u32 bg_reserved2[3]; | 173 | __u32 bg_reserved2[3]; |
174 | }; | 174 | }; |
175 | 175 | ||
@@ -1142,12 +1142,28 @@ extern ext4_fsblk_t ext4_inode_bitmap(struct super_block *sb, | |||
1142 | struct ext4_group_desc *bg); | 1142 | struct ext4_group_desc *bg); |
1143 | extern ext4_fsblk_t ext4_inode_table(struct super_block *sb, | 1143 | extern ext4_fsblk_t ext4_inode_table(struct super_block *sb, |
1144 | struct ext4_group_desc *bg); | 1144 | struct ext4_group_desc *bg); |
1145 | extern __u32 ext4_free_blks_count(struct super_block *sb, | ||
1146 | struct ext4_group_desc *bg); | ||
1147 | extern __u32 ext4_free_inodes_count(struct super_block *sb, | ||
1148 | struct ext4_group_desc *bg); | ||
1149 | extern __u32 ext4_used_dirs_count(struct super_block *sb, | ||
1150 | struct ext4_group_desc *bg); | ||
1151 | extern __u32 ext4_itable_unused_count(struct super_block *sb, | ||
1152 | struct ext4_group_desc *bg); | ||
1145 | extern void ext4_block_bitmap_set(struct super_block *sb, | 1153 | extern void ext4_block_bitmap_set(struct super_block *sb, |
1146 | struct ext4_group_desc *bg, ext4_fsblk_t blk); | 1154 | struct ext4_group_desc *bg, ext4_fsblk_t blk); |
1147 | extern void ext4_inode_bitmap_set(struct super_block *sb, | 1155 | extern void ext4_inode_bitmap_set(struct super_block *sb, |
1148 | struct ext4_group_desc *bg, ext4_fsblk_t blk); | 1156 | struct ext4_group_desc *bg, ext4_fsblk_t blk); |
1149 | extern void ext4_inode_table_set(struct super_block *sb, | 1157 | extern void ext4_inode_table_set(struct super_block *sb, |
1150 | struct ext4_group_desc *bg, ext4_fsblk_t blk); | 1158 | struct ext4_group_desc *bg, ext4_fsblk_t blk); |
1159 | extern void ext4_free_blks_set(struct super_block *sb, | ||
1160 | struct ext4_group_desc *bg, __u32 count); | ||
1161 | extern void ext4_free_inodes_set(struct super_block *sb, | ||
1162 | struct ext4_group_desc *bg, __u32 count); | ||
1163 | extern void ext4_used_dirs_set(struct super_block *sb, | ||
1164 | struct ext4_group_desc *bg, __u32 count); | ||
1165 | extern void ext4_itable_unused_set(struct super_block *sb, | ||
1166 | struct ext4_group_desc *bg, __u32 count); | ||
1151 | 1167 | ||
1152 | static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es) | 1168 | static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es) |
1153 | { | 1169 | { |