diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2014-11-25 17:44:37 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-11-25 17:44:37 +0100 |
commit | 2f8e0a7c6c89f850ebd5d6c0b9a08317030d1b89 (patch) | |
tree | 4e03e95c516bab8be44e23861626f0c0f29a3958 /fs/ext4/ext4.h | |
parent | ext4: fix block reservation for bigalloc filesystems (diff) | |
download | linux-2f8e0a7c6c89f850ebd5d6c0b9a08317030d1b89.tar.xz linux-2f8e0a7c6c89f850ebd5d6c0b9a08317030d1b89.zip |
ext4: cache extent hole in extent status tree for ext4_da_map_blocks()
Currently extent status tree doesn't cache extent hole when a write
looks up in extent tree to make sure whether a block has been allocated
or not. In this case, we don't put extent hole in extent cache because
later this extent might be removed and a new delayed extent might be
added back. But it will cause a defect when we do a lot of writes. If
we don't put extent hole in extent cache, the following writes also need
to access extent tree to look at whether or not a block has been
allocated. It brings a cache miss. This commit fixes this defect.
Also if the inode doesn't have any extent, this extent hole will be
cached as well.
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 7b3f3b1decff..98da4cda9d18 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -556,10 +556,8 @@ enum { #define EXT4_GET_BLOCKS_KEEP_SIZE 0x0080 /* Do not take i_data_sem locking in ext4_map_blocks */ #define EXT4_GET_BLOCKS_NO_LOCK 0x0100 - /* Do not put hole in extent cache */ -#define EXT4_GET_BLOCKS_NO_PUT_HOLE 0x0200 /* Convert written extents to unwritten */ -#define EXT4_GET_BLOCKS_CONVERT_UNWRITTEN 0x0400 +#define EXT4_GET_BLOCKS_CONVERT_UNWRITTEN 0x0200 /* * The bit position of these flags must not overlap with any of the |