linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Wanpeng Li <wanpeng.li@linux.intel.com>
Cc: Changman Lee <cm224.lee@samsung.com>,
	Chao Yu <chao2.yu@samsung.com>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] f2fs: guarantee node/meta inode number won't be reused
Date: Sun, 8 Mar 2015 20:52:42 -0700	[thread overview]
Message-ID: <20150309035242.GB4472@jaegeuk-mac02> (raw)
In-Reply-To: <1425870055-27694-1-git-send-email-wanpeng.li@linux.intel.com>

Hi Wanpeng,

On Mon, Mar 09, 2015 at 11:00:53AM +0800, Wanpeng Li wrote:
> Node/Meta inode numbers are also should not be reused, this patch
> guarantee it.

We don't need to do this, since the mkfs.f2fs assigns block addresses as 1
for node and meta nids in their nat entries.
So, this should not happen.
Otherwise, we should fix any bugs in nat operations.

Thanks,

> 
> 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

      parent reply	other threads:[~2015-03-09  3:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Jaegeuk Kim [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150309035242.GB4472@jaegeuk-mac02 \
    --to=jaegeuk@kernel.org \
    --cc=chao2.yu@samsung.com \
    --cc=cm224.lee@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wanpeng.li@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).