aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorAlexandre Ratchov <alexandre.ratchov@bull.net>2006-10-11 04:21:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:18 -0400
commit0d1ee42f27d30eed1659f3e85bcbbc7b3711f61f (patch)
tree9477b1b1813e67e9a0a06af13c91a34c23c42bc8 /fs/ext4/inode.c
parent18eba7aae080d4a5c0d850ea810e83d11f0a8d77 (diff)
[PATCH] ext4: allow larger descriptor size
make block group descriptor larger. Signed-off-by: Alexandre Ratchov <alexandre.ratchov@bull.net> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index c05dc57148bb..d03e7d85a638 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2432,14 +2432,16 @@ static ext4_fsblk_t ext4_get_inode_block(struct super_block *sb,
2432 return 0; 2432 return 0;
2433 } 2433 }
2434 2434
2435 gdp = (struct ext4_group_desc *)bh->b_data; 2435 gdp = (struct ext4_group_desc *)((__u8 *)bh->b_data +
2436 desc * EXT4_DESC_SIZE(sb));
2436 /* 2437 /*
2437 * Figure out the offset within the block group inode table 2438 * Figure out the offset within the block group inode table
2438 */ 2439 */
2439 offset = ((ino - 1) % EXT4_INODES_PER_GROUP(sb)) * 2440 offset = ((ino - 1) % EXT4_INODES_PER_GROUP(sb)) *
2440 EXT4_INODE_SIZE(sb); 2441 EXT4_INODE_SIZE(sb);
2441 block = ext4_inode_table(gdp + desc) + 2442 block = ext4_inode_table(gdp) + (offset >> EXT4_BLOCK_SIZE_BITS(sb));
2442 (offset >> EXT4_BLOCK_SIZE_BITS(sb)); 2443
2444
2443 2445
2444 iloc->block_group = block_group; 2446 iloc->block_group = block_group;
2445 iloc->offset = offset & (EXT4_BLOCK_SIZE(sb) - 1); 2447 iloc->offset = offset & (EXT4_BLOCK_SIZE(sb) - 1);