public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Jan Tulak <jtulak@redhat.com>,
	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: Fri, 18 Aug 2017 08:29:57 +1000	[thread overview]
Message-ID: <20170817222957.GU21024@dastard> (raw)
In-Reply-To: <4c8fe736-5749-dc80-40f7-e18275c521eb@sandeen.net>

On Thu, Aug 17, 2017 at 02:54:30PM -0500, Eric Sandeen wrote:
> On 8/17/17 2:50 PM, Jan Tulak wrote:
> > On Thu, Aug 17, 2017 at 6:01 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
> >> On 8/17/17 6:22 AM, Dave Chinner wrote:
> >>> 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....
> >>
> >> Is it even safe/legit to have different sector sizes specified
> >> for log vs data?
> >>
> > 
> > From my understanding, if the log is external (on another device), it
> > is completely ok. Unless there is some hiccup somewhere deep in the
> > code...
> 
> It can be specified, but I wonder if it's safe to have i.e. a 4k log
> sector replaying onto a 512 byte sector data section, or vice versa.

For external logs, that's fine.  The log format is independent of
the size of the objects being written to it. The sector size
determines the smallest log write that can be done and hence the
minimum log record size and the padding boundaries. It doesn't
affect the format of the data that is being stored in the log
records.

For internal logs? They should always end up using the same sector
size as the data device they reside on as both the data and the
log have the same requirements for atomic sector writes...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2017-08-17 22:30 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
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 [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=20170817222957.GU21024@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=jtulak@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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