diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-09-04 18:08:22 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-09-04 18:08:22 -0400 |
commit | 754cfed6bbcfdea6afb14f2686f7f8d71e94d4e2 (patch) | |
tree | b55990b0fb6fbabde6dacb0c9d628e6531cbd8f0 /fs/ext4/inode.c | |
parent | e3cf5d5d9a86df1c5e413bdd3725c25a16ff854c (diff) |
ext4: drop the EXT4_STATE_DELALLOC_RESERVED flag
Having done a full regression test, we can now drop the
DELALLOC_RESERVED state flag.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 4a16b0cc02de..d5dd7d46844e 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -596,14 +596,6 @@ found: | |||
596 | down_write(&EXT4_I(inode)->i_data_sem); | 596 | down_write(&EXT4_I(inode)->i_data_sem); |
597 | 597 | ||
598 | /* | 598 | /* |
599 | * if the caller is from delayed allocation writeout path | ||
600 | * we have already reserved fs blocks for allocation | ||
601 | * let the underlying get_block() function know to | ||
602 | * avoid double accounting | ||
603 | */ | ||
604 | if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) | ||
605 | ext4_set_inode_state(inode, EXT4_STATE_DELALLOC_RESERVED); | ||
606 | /* | ||
607 | * We need to check for EXT4 here because migrate | 599 | * We need to check for EXT4 here because migrate |
608 | * could have changed the inode type in between | 600 | * could have changed the inode type in between |
609 | */ | 601 | */ |
@@ -631,8 +623,6 @@ found: | |||
631 | (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE)) | 623 | (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE)) |
632 | ext4_da_update_reserve_space(inode, retval, 1); | 624 | ext4_da_update_reserve_space(inode, retval, 1); |
633 | } | 625 | } |
634 | if (flags & EXT4_GET_BLOCKS_DELALLOC_RESERVE) | ||
635 | ext4_clear_inode_state(inode, EXT4_STATE_DELALLOC_RESERVED); | ||
636 | 626 | ||
637 | if (retval > 0) { | 627 | if (retval > 0) { |
638 | unsigned int status; | 628 | unsigned int status; |
@@ -2004,12 +1994,10 @@ static int mpage_map_one_extent(handle_t *handle, struct mpage_da_data *mpd) | |||
2004 | * in data loss. So use reserved blocks to allocate metadata if | 1994 | * in data loss. So use reserved blocks to allocate metadata if |
2005 | * possible. | 1995 | * possible. |
2006 | * | 1996 | * |
2007 | * We pass in the magic EXT4_GET_BLOCKS_DELALLOC_RESERVE if the blocks | 1997 | * We pass in the magic EXT4_GET_BLOCKS_DELALLOC_RESERVE if |
2008 | * in question are delalloc blocks. This affects functions in many | 1998 | * the blocks in question are delalloc blocks. This indicates |
2009 | * different parts of the allocation call path. This flag exists | 1999 | * that the blocks and quotas has already been checked when |
2010 | * primarily because we don't want to change *many* call functions, so | 2000 | * the data was copied into the page cache. |
2011 | * ext4_map_blocks() will set the EXT4_STATE_DELALLOC_RESERVED flag | ||
2012 | * once the inode's allocation semaphore is taken. | ||
2013 | */ | 2001 | */ |
2014 | get_blocks_flags = EXT4_GET_BLOCKS_CREATE | | 2002 | get_blocks_flags = EXT4_GET_BLOCKS_CREATE | |
2015 | EXT4_GET_BLOCKS_METADATA_NOFAIL; | 2003 | EXT4_GET_BLOCKS_METADATA_NOFAIL; |