diff options
author | Weichao Guo <guoweichao@huawei.com> | 2017-10-14 08:13:32 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-10-26 10:44:16 +0200 |
commit | 48ab25f486a3f730db825758b9728fffdf237574 (patch) | |
tree | 37f39f117b9e1e5a3e745ebfa211ec14f948d24a | |
parent | 5b4267d195dd887c4412e34b5a7365baa741b679 (diff) | |
download | linux-48ab25f486a3f730db825758b9728fffdf237574.tar.bz2 |
f2fs: skip searching non-exist range in truncate_hole
Let's skip entire non-exist area to speed up truncate_hole by
using get_next_page_offset.
Signed-off-by: Weichao Guo <guoweichao@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 8fe95f8b16b1..56232a72d2a3 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -857,7 +857,7 @@ int truncate_hole(struct inode *inode, pgoff_t pg_start, pgoff_t pg_end) err = get_dnode_of_data(&dn, pg_start, LOOKUP_NODE); if (err) { if (err == -ENOENT) { - pg_start++; + pg_start = get_next_page_offset(&dn, pg_start); continue; } return err; |