All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] f2fs: don't keep meta pages used for block migration
@ 2018-07-27 10:15 ` Chao Yu
  0 siblings, 0 replies; 21+ messages in thread
From: Chao Yu @ 2018-07-27 10:15 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu

For migration of encrypted inode's block, we load data of encrypted block
into meta inode's page cache, after checkpoint, those all intermediate
pages should be clean, and no one will read them again, so let's just
release them for more memory.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/checkpoint.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 12bebb8fa13d..67834d0ca422 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1499,6 +1499,14 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
 	commit_checkpoint(sbi, ckpt, start_blk);
 	wait_on_all_pages_writeback(sbi);
 
+	/*
+	 * invalidate intermediate page cache borrowed from meta inode
+	 * which are used for migration of encrypted inode's blocks.
+	 */
+	if (f2fs_sb_has_encrypt(sbi->sb))
+		invalidate_mapping_pages(META_MAPPING(sbi),
+				MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1);
+
 	f2fs_release_ino_entry(sbi, false);
 
 	f2fs_reset_fsync_node_info(sbi);
-- 
2.18.0.rc1


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-07-29  6:16 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 10:15 [PATCH 1/4] f2fs: don't keep meta pages used for block migration Chao Yu
2018-07-27 10:15 ` Chao Yu
2018-07-27 10:15 ` [PATCH 2/4] f2fs: fix to active page in lru list for read path Chao Yu
2018-07-27 10:15   ` Chao Yu
2018-07-27 10:15 ` [PATCH 3/4] f2fs: fix avoid race between truncate and background GC Chao Yu
2018-07-27 10:15   ` Chao Yu
2018-07-29  1:58   ` Jaegeuk Kim
2018-07-29  1:58     ` Jaegeuk Kim
2018-07-29  6:02     ` Chao Yu
2018-07-29  6:13       ` Jaegeuk Kim
2018-07-29  6:16         ` Chao Yu
2018-07-27 10:15 ` [PATCH 4/4] f2fs: fix to spread clear_cold_data() Chao Yu
2018-07-27 10:15   ` Chao Yu
2018-07-29  2:00   ` Jaegeuk Kim
2018-07-29  2:00     ` Jaegeuk Kim
2018-07-29  2:19     ` Chao Yu
2018-07-29  2:19       ` Chao Yu
2018-07-29  2:44       ` Jaegeuk Kim
2018-07-29  2:44         ` Jaegeuk Kim
2018-07-29  3:19         ` Chao Yu
2018-07-29  3:19           ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.