summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorHou Pengyang <houpengyang@huawei.com>2017-04-25 14:45:13 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2017-05-03 06:19:47 +0200
commite959c8f543e11dadf7f6923427fb3acb452a0de6 (patch)
tree79ae2172c8d1d45231a6e3eea23aacf22be00a84 /fs/f2fs/segment.c
parentf2fs: reconstruct code to write a data page (diff)
downloadlinux-e959c8f543e11dadf7f6923427fb3acb452a0de6.tar.xz
linux-e959c8f543e11dadf7f6923427fb3acb452a0de6.zip
f2fs: lookup extent cache first under IPU scenario
If a page is cold, NOT atomit written and need_ipu now, there is a high probability that IPU should be adapted. For IPU, we try to check extent tree to get the block index first, instead of reading the dnode page, where may lead to an useless dnode IO, since no need to update the dnode index for IPU. Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 35d5d49e7614..38b97ad6bceb 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -311,6 +311,7 @@ static int __commit_inmem_pages(struct inode *inode,
}
fio.page = page;
+ fio.old_blkaddr = NULL_ADDR;
err = do_write_data_page(&fio);
if (err) {
unlock_page(page);