aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-09-25 14:17:51 +0800
committerMister Oyster <oysterized@gmail.com>2017-12-06 16:39:41 +0100
commit4b9f1a85e379251c47a0a95e52d622d815630bcf (patch)
tree0d9577de33ba4bd6451b6a6c29e541d2496a5e40 /fs/f2fs
parent5d3db2c0f844899bdeb53f69b5b68e054a1dd352 (diff)
Revert "f2fs: reuse nids more aggressively"
Commit 268344664603 ("f2fs: reuse nids more aggressively") tries to reuse nids as many as possilbe, in order to mitigate producing obsolete node pages in page cache. But acutally, before we reuse the nids and related node page cache, we will always invalidate that node page, so there will be not any obsolete node pages in cache. Let's just revert previous commit, so that nm_i::next_scan_nid can be increased ascendingly, making __build_free_nids traverses all NAT pages more easily, finally, free nid bitmap cache can be enabled as soon as possible. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/node.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 83c456025..58ca3a570 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -337,10 +337,6 @@ 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 */