All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] f2fs: reuse nids more aggressively
@ 2015-08-18  8:46 Jaegeuk Kim
  2015-08-18  8:46   ` Jaegeuk Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Jaegeuk Kim @ 2015-08-18  8:46 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim

If we can reuse nids as many as possible, we can mitigate producing obsolete
node pages in the page cache.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/node.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 6e10c2a..3cc32b8 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -306,6 +306,10 @@ static void set_node_addr(struct f2fs_sb_info *sbi, struct node_info *ni,
 	if (nat_get_blkaddr(e) != NEW_ADDR && new_blkaddr == NULL_ADDR) {
 		unsigned char version = nat_get_version(e);
 		nat_set_version(e, inc_node_version(version));
+
+		/* in order to reuse the nid */
+		if (nm_i->next_scan_nid > ni->nid)
+			nm_i->next_scan_nid = ni->nid;
 	}
 
 	/* change address */
-- 
2.1.1


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

end of thread, other threads:[~2015-08-24  9:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18  8:46 [PATCH 1/5] f2fs: reuse nids more aggressively Jaegeuk Kim
2015-08-18  8:46 ` [PATCH 2/5] f2fs: fix to cover lock_op for update_inode_page Jaegeuk Kim
2015-08-18  8:46   ` Jaegeuk Kim
2015-08-20  9:09   ` Chao Yu
2015-08-20  9:09     ` [f2fs-dev] " Chao Yu
2015-08-18  8:46 ` [PATCH 3/5] f2fs: retry gc if one section is not successfully reclaimed Jaegeuk Kim
2015-08-18  8:46   ` Jaegeuk Kim
2015-08-18  8:46 ` [PATCH 4/5] f2fs: go out for insert_inode_locked failure Jaegeuk Kim
2015-08-18  8:46   ` Jaegeuk Kim
2015-08-20  9:11   ` [f2fs-dev] " Chao Yu
2015-08-18  8:46 ` [PATCH 5/5] f2fs: check the node block address of newly allocated nid Jaegeuk Kim
2015-08-20  9:12   ` Chao Yu
2015-08-20  9:12     ` [f2fs-dev] " Chao Yu
2015-08-20 15:35     ` Jaegeuk Kim
2015-08-20 15:35       ` [f2fs-dev] " Jaegeuk Kim
2015-08-21 12:48       ` Chao Yu
2015-08-21 14:59         ` Chao Yu
2015-08-21 14:59           ` [f2fs-dev] " Chao Yu
2015-08-24  9:38           ` Chao Yu
2015-08-20  9:01 ` [f2fs-dev] [PATCH 1/5] f2fs: reuse nids more aggressively 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.