projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f18884
)
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>
Tue, 19 Dec 2017 01:22:12 +0000
(17:22 -0800)
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
|
blame
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index e436f88eaff57c1188b8ebce41ec2a8ddb18d615..2a414561eb4a34d288584b735a53e3cc2e8ae89e 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;