diff options
| author | Weichao Guo <guoweichao@huawei.com> | 2017-10-14 08:13:32 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-12-06 16:44:37 +0100 |
| commit | d4e3fdcddde901926289179a534f234bb6c78138 (patch) | |
| tree | c35e02246e46aaaadb070a84a15985f917930c47 | |
| parent | d93190e7eaf3427d1f0e6783affe642ebb7712c0 (diff) | |
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 3b9f8dba8..3453d2f24 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -856,7 +856,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; |
