All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Eric Sandeen <sandeen@redhat.com>,
	linux-xfs <linux-xfs@vger.kernel.org>,
	Jan Tulak <jtulak@redhat.com>
Subject: Re: [PATCH] mkfs.xfs: Assign proper defaults to rmapbt and reflink flags
Date: Thu, 27 Apr 2017 08:50:44 +1000	[thread overview]
Message-ID: <20170426225044.GL12369@dastard> (raw)
In-Reply-To: <20170426151059.GN5205@birch.djwong.org>

On Wed, Apr 26, 2017 at 08:10:59AM -0700, Darrick J. Wong wrote:
> On Wed, Apr 26, 2017 at 09:02:44AM -0500, Eric Sandeen wrote:
> > The "defaultval" field in the options structure was a bit confusing,
> > so when the rmapbt & reflink options got added, the desire was
> > to keep them off by default, and "defaultval = 0" got set.
> > 
> > However, the purpose of this field is to define the default value
> > when the flag is specified with no associated value, i.e.
> > 
> > -m rmapbt vs. -m rmapbt=0 or -m rmapbt=1
> > 
> > Today, the resulting behavior is unexpected, and different from any
> > other mkfs flags; specifying "-m rmapbt,reflink" results in a
> > filesystem /without/ those features.
> > 
> > Fix these to be consistent with every other boolean flag in the
> > mkfs options, so that specifying the flag with no value will
> > enable the feature.
> > 
> > Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> 
> Someone should document that 'defaultval' is not the way to say
> 'disabled by default' in whatever the mkfs option processing code
> turns into.

....
 *   defaultval MANDATORY
 *     The value used if user specifies the subopt, but no value.
 *     If the subopt accepts some values (-d file=[1|0]), then this
 *     sets what is used with simple specifying the subopt (-d file).
 *     A special SUBOPT_NEEDS_VAL can be used to require a user-given
 *     value in any case.
 */
....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      parent reply	other threads:[~2017-04-26 22:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-26 14:02 [PATCH] mkfs.xfs: Assign proper defaults to rmapbt and reflink flags Eric Sandeen
2017-04-26 15:10 ` Darrick J. Wong
2017-04-26 15:16   ` Jan Tulak
2017-04-26 22:50   ` Dave Chinner [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=20170426225044.GL12369@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=jtulak@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.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.