linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Huajun Li <huajun.li.lee@gmail.com>
Cc: linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Huajun Li <huajun.li@intel.com>
Subject: Re: [PATCH 1/1] No need to do recovery if there is no available CP
Date: Tue, 05 Nov 2013 13:48:06 +0900	[thread overview]
Message-ID: <1383626886.14041.65.camel@kjgkr> (raw)
In-Reply-To: <CA+v9cxZrDJ0GRLGyzsiPo1p1mPDZHvERnHqrKHSEKQ9+M+pMLg@mail.gmail.com>

Hi Huajun,

2013-11-04 (월), 23:40 +0800, Huajun Li:
> Hi Jaegeuk,
> 
> On Mon, Nov 4, 2013 at 9:24 AM, Jaegeuk Kim <jaegeuk.kim@samsung.com> wrote:
> > 2013-11-03 (일), 23:08 +0800, Huajun Li:
> >> From: Huajun Li <huajun.li@intel.com>
> >>
> >> Normally we expect an empty partition after formatting by
> >> mkfs.f2fs. But in this case, when we format a dirty partition and mount
> >> it again. The former file will be recovered and available again! and
> >> kernel log shows a recovery procedure is evoked.
> >> This patch adds a new flag CP_EXIST_FLAG to indicate whether is a
> >> available CP, and do recovery only when this flag is set.
> >
> > IMO, mkfs.f2fs should do the right thing to avoid this.
> > If storage does not support discard, mkfs.f2fs can simply address the
> > problem by writing one node block with zeros to prevent this.
> >
> Yes, mkfs.f2fs should do this definitely. :)
> 
> > And, if you introduce a new flag, mkfs.f2fs should do the same thing,
> > which means that mkfs.f2fs also needs to set the CP_EXIST_FLAG.
> > So then, it could not fix the bug.
> >
> > How do you think?
> 
> IMO, mkfs.f2fs doesn't need to set CP_EXIST_FLAG. This flag indicates
> there exists an available CP, so an new formatted partition don't need
> set the flag since there is no CP on it yet.


Ah, what I concern is that mkfs.f2fs writes a valid CP so that it should
set the flag.


> On the other hand, while mounting a partition, we need to do recovery
> only if there is CP on the partition. So this flag may be helpful,
> right?

If there is no valid CP, f2fs never goes to recover path.
So, I doubt the necessity of that flag. :)

Thanks,

-- 
Jaegeuk Kim
Samsung

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-11-05  4:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-03 15:08 [PATCH 1/1] No need to do recovery if there is no available CP Huajun Li
2013-11-04  1:24 ` Jaegeuk Kim
2013-11-04 15:40   ` Huajun Li
2013-11-05  4:48     ` Jaegeuk Kim [this message]
2013-11-05 13:28       ` Huajun Li
2013-11-11  4:33         ` Jaegeuk Kim
2013-11-11  6:06           ` Huajun Li

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=1383626886.14041.65.camel@kjgkr \
    --to=jaegeuk.kim@samsung.com \
    --cc=huajun.li.lee@gmail.com \
    --cc=huajun.li@intel.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).