diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2014-11-25 11:44:37 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-11-25 11:44:37 -0500 |
commit | 2f8e0a7c6c89f850ebd5d6c0b9a08317030d1b89 (patch) | |
tree | 4e03e95c516bab8be44e23861626f0c0f29a3958 /include/trace/events | |
parent | cbd7584e6ead1b79fb0b81573f158b57fa1f0b49 (diff) |
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 'include/trace/events')
-rw-r--r-- | include/trace/events/ext4.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index bb7dcbe99652..cd37a584ee88 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -43,8 +43,7 @@ struct extent_status; | |||
43 | { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \ | 43 | { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \ |
44 | { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \ | 44 | { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \ |
45 | { EXT4_GET_BLOCKS_KEEP_SIZE, "KEEP_SIZE" }, \ | 45 | { EXT4_GET_BLOCKS_KEEP_SIZE, "KEEP_SIZE" }, \ |
46 | { EXT4_GET_BLOCKS_NO_LOCK, "NO_LOCK" }, \ | 46 | { EXT4_GET_BLOCKS_NO_LOCK, "NO_LOCK" }) |
47 | { EXT4_GET_BLOCKS_NO_PUT_HOLE, "NO_PUT_HOLE" }) | ||
48 | 47 | ||
49 | #define show_mflags(flags) __print_flags(flags, "", \ | 48 | #define show_mflags(flags) __print_flags(flags, "", \ |
50 | { EXT4_MAP_NEW, "N" }, \ | 49 | { EXT4_MAP_NEW, "N" }, \ |