All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	Vyacheslav.Dubeyko@hgst.com, Cyril.Guyot@hgst.com,
	Adam.Manzanares@hgst.com, Damien.LeMoal@hgst.com
Subject: Re: [PATCH] f2fs: introduce on-disk layout version checking functionality
Date: Wed, 25 May 2016 10:12:46 -0700	[thread overview]
Message-ID: <20160525171246.GC47096@jaegeuk.gateway> (raw)
In-Reply-To: <1464138323.2680.27.camel@slavad-ubuntu-14.04>

Hello,

On Tue, May 24, 2016 at 06:05:23PM -0700, Viacheslav Dubeyko wrote:
> Hi Jaegeuk,
> 
> On Mon, 2016-05-23 at 14:13 -0700, Jaegeuk Kim wrote:
> > Hi Slava,
> > 
> > On Thu, May 19, 2016 at 10:46:06AM -0700, Viacheslav Dubeyko wrote:
> > ...
> > >  
> > > +#ifdef CONFIG_F2FS_16TB_VOLUME_SUPPORT
> > > +#define F2FS_MAX_SUPP_MAJOR_VERSION		(2)
> > > +#define F2FS_MIN_16TB_VOLUME_SUPPORT_VERSION	(2)
> > > +#else
> > > +#define F2FS_MAX_SUPP_MAJOR_VERSION		(1)
> > > +#endif
> > > +
> > ...
> > >  
> > > +static int f2fs_check_version_and_features(struct super_block *sb,
> > > +					   struct f2fs_super_block *raw_super)
> > > +{
> > > +	u16 major_ver = le16_to_cpu(raw_super->major_ver);
> > > +	u32 feature = le32_to_cpu(raw_super->feature);
> > > +
> > > +	if (major_ver > F2FS_MAX_SUPP_MAJOR_VERSION) {
> > 
> > This means, for example, f2fs driver in v4.8 will deny to mount a partition
> > formatted by mkfs.f2fs v3.x, which doesn't make sense, IIUC.
> > 
> 
> I didn't catch the point. Maybe, I've missed something but, as far as I
> can judge, f2fs driver v.4.8 will mount as old version of on-disk layout
> as the new one. But right now it doesn't make sense to discuss this
> topic because we haven't consent about ideology of this patch.
> 
> > As Christoph mentioned, how about checking the feature only like this?
> > 
> > 1. if the feature is ON,
> >  - go 64 bits   , when compiled w/  F2FS_MIN_16TB_VOLUME_SUPPORT
> >  - fail to mount, when compiled w/o F2FS_MIN_16TB_VOLUME_SUPPORT
> > 
> > 2. if the feature is OFF,
> >  - fail to mount, when compiled w/  F2FS_MIN_16TB_VOLUME_SUPPORT
> >  - go 32 bits   , when compiled w/o F2FS_MIN_16TB_VOLUME_SUPPORT
> > 
> > Thoughts?
> > 
> 
> So, my logic is simple. We are trying to modify the on-disk layout. As a
> result, we need to check the on-disk layout version, from my viewpoint.
> And this modification is not "feature" itself but simple bug fix. And I
> believe that "major_ver", "minor_ver" in F2FS superblock is the on-disk
> layout version.

Hmm, the versions are to indicate f2fs-tools, not on-disk layout something.
They are simply growing as whatever reasons such as bug fixes, new features,
and so on to provide debugging information.

Thanks,

> 
> What do you think? Do you still believe that it should be a feature
> flag?
> 
> Thanks,
> Vyacheslav Dubeyko.
> 

  reply	other threads:[~2016-05-25 17:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 17:46 [PATCH] f2fs: introduce on-disk layout version checking functionality Viacheslav Dubeyko
2016-05-20  7:58 ` Christoph Hellwig
2016-05-20 18:30   ` Viacheslav Dubeyko
2016-05-23  8:25     ` Christoph Hellwig
2016-05-23 20:08       ` Viacheslav Dubeyko
2016-05-24  8:52         ` Christoph Hellwig
2016-05-25  0:53           ` Viacheslav Dubeyko
2016-05-23 21:13 ` Jaegeuk Kim
2016-05-23 21:13   ` Jaegeuk Kim
2016-05-24  8:53   ` Christoph Hellwig
2016-05-25  0:34     ` Viacheslav Dubeyko
2016-05-25  1:05   ` Viacheslav Dubeyko
2016-05-25 17:12     ` Jaegeuk Kim [this message]
2016-05-25 17:46       ` Viacheslav Dubeyko

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=20160525171246.GC47096@jaegeuk.gateway \
    --to=jaegeuk@kernel.org \
    --cc=Adam.Manzanares@hgst.com \
    --cc=Cyril.Guyot@hgst.com \
    --cc=Damien.LeMoal@hgst.com \
    --cc=Vyacheslav.Dubeyko@hgst.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=slava@dubeyko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.