summaryrefslogtreecommitdiff
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorWeichao Guo <guoweichao@huawei.com>2016-09-20 05:03:27 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-09-30 17:34:23 -0700
commit5b7a487cf32d3a266fea83d590d3226b5ad817a7 (patch)
treeb94819fd074d9e312a10f0fd2259e9295b008418 /fs/f2fs/f2fs.h
parentaaec2b1d18792a5f27b69ff37f34f43f89f5aa3b (diff)
downloadlwn-5b7a487cf32d3a266fea83d590d3226b5ad817a7.tar.gz
lwn-5b7a487cf32d3a266fea83d590d3226b5ad817a7.zip
f2fs: add customized migrate_page callback
This patch improves the migration of dirty pages and allows migrating atomic written pages that F2FS uses in Page Cache. Instead of the fallback releasing page path, it provides better performance for memory compaction, CMA and other users of memory page migrating. For dirty pages, there is no need to write back first when migrating. For an atomic written page before committing, we can migrate the page and update the related 'inmem_pages' list at the same time. Signed-off-by: Weichao Guo <guoweichao@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> [Jaegeuk Kim: fix some coding style] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 2fb8c353ab4a..090319114961 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2152,6 +2152,10 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *, u64, u64);
void f2fs_set_page_dirty_nobuffers(struct page *);
void f2fs_invalidate_page(struct page *, unsigned int, unsigned int);
int f2fs_release_page(struct page *, gfp_t);
+#ifdef CONFIG_MIGRATION
+int f2fs_migrate_page(struct address_space *, struct page *, struct page *,
+ enum migrate_mode);
+#endif
/*
* gc.c