linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] f2fs: guarantee node/meta inode number won't be reused
@ 2015-03-09  3:00 Wanpeng Li
  2015-03-09  3:00 ` [PATCH 2/3] f2fs: fix get stale meta pages when build free nids Wanpeng Li
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Wanpeng Li @ 2015-03-09  3:00 UTC (permalink / raw)
  To: Jaegeuk Kim
  Cc: Changman Lee, Chao Yu, linux-f2fs-devel, linux-fsdevel,
	linux-kernel, Wanpeng Li

Node/Meta inode numbers are also should not be reused, this patch
guarantee it.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
---
 fs/f2fs/node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 4687eae..1a7e925 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1421,7 +1421,7 @@ static int add_free_nid(struct f2fs_sb_info *sbi, nid_t nid, bool build)
 		return -1;
 
 	/* 0 nid should not be used */
-	if (unlikely(nid == 0))
+	if (unlikely(nid == 0 || nid == 1 || nid == 2))
 		return 0;
 
 	if (build) {
-- 
1.9.1


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

end of thread, other threads:[~2015-03-09 10:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09  3:00 [PATCH 1/3] f2fs: guarantee node/meta inode number won't be reused Wanpeng Li
2015-03-09  3:00 ` [PATCH 2/3] f2fs: fix get stale meta pages when build free nids Wanpeng Li
2015-03-09  4:18   ` Jaegeuk Kim
2015-03-09  4:24     ` Wanpeng Li
2015-03-09 10:01       ` Chao Yu
2015-03-09  3:00 ` [PATCH 3/3] f2fs: fix unlocked nat set cache operation Wanpeng Li
2015-03-09  3:52 ` [PATCH 1/3] f2fs: guarantee node/meta inode number won't be reused Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).