public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <eguan@redhat.com>
Cc: Theodore Ts'o <tytso@mit.edu>, fstests@vger.kernel.org
Subject: Re: [PATCH] common: rework _require_ext4_mkfs_feature
Date: Wed, 15 Nov 2017 11:56:55 +1100	[thread overview]
Message-ID: <20171115005655.GE4094@dastard> (raw)
In-Reply-To: <20171114114315.GH17339@eguan.usersys.redhat.com>

On Tue, Nov 14, 2017 at 07:43:15PM +0800, Eryu Guan wrote:
> On Sun, Nov 12, 2017 at 08:36:21AM -0500, Theodore Ts'o wrote:
> > In all of the places where we need check to see if mkfs.ext4 can
> > support a set of file system features, we also should be checking to
> > see if the kernel can support those file system features.  So rename
> > _require_ext4_mkfs_feature to _require_ext4_feature, and actually
> > format the file system in $SCRATCH.  To avoid running mkfs twice in
> > most tests, we will teach the tests to assume that
> > _require_ext4_feature actually leaves $SCRATCH formatted with a file
> > system with those features.
> 
> Hmm, I don't think this the correct usage of _require rules. We use
> _require rule to check if the requirements have been met, but don't
> count on it to do any actual work. And we could always create a small
> filesystem (say 512m) if we want to reduce the mkfs time in the _require
> rule.

Implement, like in mkfs.xfs, the "-N" flag (a.k.a "--dry-run").
It does option parsing and geometry calculations, outputs the config
that would be made, then exits before doing any actual IO. Hence we
can check mkfs feature support on XFS, and only take the time to
make a filesystem if we need to check that kernel support exists.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  parent reply	other threads:[~2017-11-15  0:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12 13:36 [PATCH] common: rework _require_ext4_mkfs_feature Theodore Ts'o
2017-11-14 11:43 ` Eryu Guan
2017-11-14 23:38   ` Theodore Ts'o
2017-11-15  0:30     ` [PATCH -v3] " Theodore Ts'o
2017-11-16  4:00       ` Eryu Guan
2017-11-15  0:56   ` Dave Chinner [this message]
2017-11-15  2:57     ` [PATCH] " Theodore Ts'o

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=20171115005655.GE4094@dastard \
    --to=david@fromorbit.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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