Hi Huajun, 2013-11-04 (월), 23:40 +0800, Huajun Li: > Hi Jaegeuk, > > On Mon, Nov 4, 2013 at 9:24 AM, Jaegeuk Kim <jaegeuk....@samsung.com> wrote: > > 2013-11-03 (일), 23:08 +0800, Huajun Li: > >> From: Huajun Li <huajun...@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 ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel