diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-01-10 12:12:36 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-01-10 12:12:36 -0500 |
commit | f232109773ff5b0c840a6761d74940b9cf0d66ec (patch) | |
tree | a32da5ebd1a3e074e9f52107f3bdc23babb6340c /fs/ext4/inode.c | |
parent | ad4fb9cafe100a4a9de6e0529015e584d94ac8dc (diff) |
ext4: replace i_delalloc_reserved_flag with EXT4_STATE_DELALLOC_RESERVED
Remove the short element i_delalloc_reserved_flag from the
ext4_inode_info structure and replace it a new bit in i_state_flags.
Since we have an ext4_inode_info for every ext4 inode cached in the
inode cache, any savings we can produce here is a very good thing from
a memory utilization perspective.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c0fe426d444a..ac08460921aa 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -1330,7 +1330,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, | |||
1330 | * avoid double accounting | 1330 | * avoid double accounting |
1331 | */ | 1331 | */ |
1332 | if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) | 1332 | if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) |
1333 | EXT4_I(inode)->i_delalloc_reserved_flag = 1; | 1333 | ext4_set_inode_state(inode, EXT4_STATE_DELALLOC_RESERVED); |
1334 | /* | 1334 | /* |
1335 | * We need to check for EXT4 here because migrate | 1335 | * We need to check for EXT4 here because migrate |
1336 | * could have changed the inode type in between | 1336 | * could have changed the inode type in between |
@@ -1360,7 +1360,7 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode, | |||
1360 | ext4_da_update_reserve_space(inode, retval, 1); | 1360 | ext4_da_update_reserve_space(inode, retval, 1); |
1361 | } | 1361 | } |
1362 | if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) | 1362 | if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) |
1363 | EXT4_I(inode)->i_delalloc_reserved_flag = 0; | 1363 | ext4_clear_inode_state(inode, EXT4_STATE_DELALLOC_RESERVED); |
1364 | 1364 | ||
1365 | up_write((&EXT4_I(inode)->i_data_sem)); | 1365 | up_write((&EXT4_I(inode)->i_data_sem)); |
1366 | if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED) { | 1366 | if (retval > 0 && map->m_flags & EXT4_MAP_MAPPED) { |
@@ -2249,7 +2249,7 @@ static void mpage_da_map_and_submit(struct mpage_da_data *mpd) | |||
2249 | * affects functions in many different parts of the allocation | 2249 | * affects functions in many different parts of the allocation |
2250 | * call path. This flag exists primarily because we don't | 2250 | * call path. This flag exists primarily because we don't |
2251 | * want to change *many* call functions, so ext4_map_blocks() | 2251 | * want to change *many* call functions, so ext4_map_blocks() |
2252 | * will set the magic i_delalloc_reserved_flag once the | 2252 | * will set the EXT4_STATE_DELALLOC_RESERVED flag once the |
2253 | * inode's allocation semaphore is taken. | 2253 | * inode's allocation semaphore is taken. |
2254 | * | 2254 | * |
2255 | * If the blocks in questions were delalloc blocks, set | 2255 | * If the blocks in questions were delalloc blocks, set |