diff options
author | Fan Li <fanofcode.li@samsung.com> | 2015-07-08 08:02:54 (GMT) |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-08-04 21:09:58 (GMT) |
commit | 3c7df87dad065a4656b13115593c59c8a324a108 (patch) | |
tree | c3e4a40eaa16a1a55a2f3224351e491038f42db6 /fs/f2fs | |
parent | 90d4388ac2cec0c83cad7315d3cd0065553430e1 (diff) | |
download | linux-3c7df87dad065a4656b13115593c59c8a324a108.tar.xz |
f2fs: don't try to split extents shorter than F2FS_MIN_EXTENT_LEN
Since only parts of extents longer than F2FS_MIN_EXTENT_LEN will
be kept in extent cache after split, extents already shorter than
F2FS_MIN_EXTENT_LEN don't need to try split at all.
Signed-off-by: Fan Li <fanofcode.li@samsung.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index de55c08..ce0d5ec 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -585,7 +585,7 @@ static bool f2fs_update_extent_tree(struct inode *inode, pgoff_t fofs, __detach_extent_node(sbi, et, en); /* 2. if extent can be split more, split and insert the left part */ - if (dei.len > 1) { + if (dei.len > F2FS_MIN_EXTENT_LEN) { /* insert left part of split extent into cache */ if (fofs - dei.fofs >= F2FS_MIN_EXTENT_LEN) { set_extent_info(&ei, dei.fofs, dei.blk, |