ext4: use ext4_lblk_t instead of sector_t for logical blocks
This fixes a number of places where we used sector_t instead of ext4_lblk_t for logical blocks, which for ext4 are still 32-bit data types. No point wasting space in the ext4_inode_info structure, and requiring 64-bit arithmetic on 32-bit systems, when it isn't necessary. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
@@ -1091,7 +1091,7 @@ static int ext4_indirect_calc_metadata_amount(struct inode *inode,
|
||||
* Calculate the number of metadata blocks need to reserve
|
||||
* to allocate a block located at @lblock
|
||||
*/
|
||||
static int ext4_calc_metadata_amount(struct inode *inode, sector_t lblock)
|
||||
static int ext4_calc_metadata_amount(struct inode *inode, ext4_lblk_t lblock)
|
||||
{
|
||||
if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
|
||||
return ext4_ext_calc_metadata_amount(inode, lblock);
|
||||
@@ -1888,7 +1888,7 @@ static int ext4_journalled_write_end(struct file *file,
|
||||
/*
|
||||
* Reserve a single block located at lblock
|
||||
*/
|
||||
static int ext4_da_reserve_space(struct inode *inode, sector_t lblock)
|
||||
static int ext4_da_reserve_space(struct inode *inode, ext4_lblk_t lblock)
|
||||
{
|
||||
int retries = 0;
|
||||
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
|
||||
|
Reference in New Issue
Block a user