public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <eguan@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	fstests@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH] xfs/259: handle minimum block size more precisely
Date: Wed, 13 Apr 2016 07:01:01 +1000	[thread overview]
Message-ID: <20160412210101.GA10643@dastard> (raw)
In-Reply-To: <20160411113811.GH10345@eguan.usersys.redhat.com>

On Mon, Apr 11, 2016 at 07:38:11PM +0800, Eryu Guan wrote:
> On Mon, Apr 11, 2016 at 10:02:38AM +1000, Dave Chinner wrote:
> > Which is not at all clear from the patch description.
> > 
> > Seriously, though, this does not belong in common/config. We already
> > have a helper function to check what mkfs supports (i.e.
> >  _scratch_mkfs_xfs_supported()), and if we just want a bare check
> > then factor this into a _mkfs_xfs_supported() and supply the
> > parameters specific to the test.
> > 
> > Indeed, this is basically what we do with _require_xfs_mkfs_crc();
> > the same thing should be done, but without the "notrun" if -m crc
> > s not supported...
> 
> Looking into _require_xfs_mkfs_crc() and _scratch_mkfs_xfs_supported(),
> I noticed that they are not the helpers I want. They are testing whether
> mkfs.xfs supports CRC (or other mkfs options), what I want is what's the
> default behavior of mkfs.xfs (CRC enabled or not).

All this, just to avoid testing on an invalid block size when CRCs
are enabled. I really don't see why this needs changes to generic
infrastructure - it's a test specific problem.

How about you simply reverse the block size order that is tested,
and capture the output of the actual mkfs command that is being
tested, and determine if 512 byte block sizes should be tested
based on that output? i.e.

for b in 4096 2038 1024 512; do
	if [ $b -eq 512 -a $_fs_has_crcs -ne 1 ]; then
		break;
	fi
....
	mkfs -b $b ....
	. $tmp.mkfs
done

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2016-04-12 21:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 11:05 [PATCH] xfs/259: handle minimum block size more precisely Eryu Guan
2016-04-07 15:46 ` Christoph Hellwig
2016-04-07 21:32 ` Dave Chinner
2016-04-07 23:48   ` Christoph Hellwig
2016-04-11  0:02     ` Dave Chinner
2016-04-11  3:12       ` Eryu Guan
2016-04-11 11:38       ` Eryu Guan
2016-04-12 21:01         ` 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=20160412210101.GA10643@dastard \
    --to=david@fromorbit.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox