public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: linux-xfs <linux-xfs@vger.kernel.org>,
	"Darrick J. Wong" <darrick.wong@oracle.com>
Subject: Re: [PATCH] xfsprogs: add sectsize/sectlog to the man page
Date: Thu, 17 Aug 2017 21:22:17 +1000	[thread overview]
Message-ID: <20170817112217.GS21024@dastard> (raw)
In-Reply-To: <CACj3i7301p_NZJpaATZG-YCf-AAuvnh05kWhXHjMc3GTBQm2Hg@mail.gmail.com>

On Thu, Aug 17, 2017 at 11:45:34AM +0200, Jan Tulak wrote:
> On Thu, Aug 17, 2017 at 10:35 AM, Dave Chinner <david@fromorbit.com> wrote:
> > On Thu, Aug 17, 2017 at 09:38:44AM +0200, Jan Tulak wrote:
> >> The man page is missing description of these options.
> >> Add it.
> >
> > Just remove the options. They are redundant as they cannot be
> > different from the values set by the "-s" sector size options.
> > They aren't documented, so just remove them from mkfs.
> >
> 
> The code doesn't look like that. From what it does:
> 
> -d sectsize: will set data section sector size
> -l sectsize: will set log section sector size (and as I see now, this
> is not in man page as well)
> -s size: will set both data and log sector size

If you just look at the option parsing, then it appears that way.

But go an look at the code that validates and uses these options.
It will only take a log sector size specification for external logs,
other wise it will use the global sector size. Which is the same as
the data section sector size.

Hence for internal log filesystems, "-l sectsize" is ignored, and
"-s size" and "-d sectsize" set exactly the same variable.  And for
external logs, having "-s size" override the "-l sectsize" is
completely wrong, but that's what it does....

IOWs, the way the sector size parsing and validation is done is an
utter mess - it's not surprising that nobody can work out what it
does exactly because the code is even more messy and hard to
understand than the CLI interface....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2017-08-17 11:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  7:38 [PATCH] xfsprogs: add sectsize/sectlog to the man page Jan Tulak
2017-08-17  8:35 ` Dave Chinner
2017-08-17  9:45   ` Jan Tulak
2017-08-17 11:22     ` Dave Chinner [this message]
2017-08-17 14:45       ` Jan Tulak
2017-08-17 16:01       ` Eric Sandeen
2017-08-17 19:50         ` Jan Tulak
2017-08-17 19:54           ` Eric Sandeen
2017-08-17 22:29             ` Dave Chinner

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=20170817112217.GS21024@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=jtulak@redhat.com \
    --cc=linux-xfs@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