projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b4267d
)
f2fs: skip searching non-exist range in truncate_hole
author
Weichao Guo
<guoweichao@huawei.com>
Sat, 14 Oct 2017 00:13:32 +0000
(08:13 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Thu, 26 Oct 2017 08:44:16 +0000
(10:44 +0200)
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>
fs/f2fs/file.c
patch
|
blob
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index
8fe95f8
..
56232a7
100644
(file)
--- 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;