mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] f2fs: Use nm_i->next_scan_nid as default for next_free_nid
@ 2014-09-12 12:19 Huang Ying
  0 siblings, 0 replies; only message in thread
From: Huang Ying @ 2014-09-12 12:19 UTC (permalink / raw)
  To: Jaegeuk Kim, Changman Lee
  Cc: linux-f2fs-devel, linux-kernel, Huang Ying, huang.ying.caritas

Now, if there is no free nid in nm_i->free_nid_list, 0 may be saved
into next_free_nid of checkpoint, this may cause useless scanning for
next mount.  nm_i->next_scan_nid should be a better default value than
0.

Signed-off-by: Huang, Ying <ying.huang@intel.com>
---
 fs/f2fs/checkpoint.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -802,7 +802,8 @@ static void do_checkpoint(struct f2fs_sb
 {
 	struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
 	struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_WARM_NODE);
-	nid_t last_nid = 0;
+	struct f2fs_nm_info *nm_i = NM_I(sbi);
+	nid_t last_nid = nm_i->next_scan_nid;
 	block_t start_blk;
 	struct page *cp_page;
 	unsigned int data_sum_blocks, orphan_blocks;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-12 12:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-12 12:19 [PATCH] f2fs: Use nm_i->next_scan_nid as default for next_free_nid Huang Ying

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®