All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: xfs@oss.sgi.com, Eryu Guan <eguan@redhat.com>
Subject: [PATCH v2] xfs/073: avoid finobt warning from mkfs
Date: Wed, 16 Mar 2016 23:04:44 +0800	[thread overview]
Message-ID: <1458140684-4723-1-git-send-email-eguan@redhat.com> (raw)
In-Reply-To: <1458129204-31882-1-git-send-email-eguan@redhat.com>

When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
due to extra warning about disabling finobt feature:

 +warning: finobt not supported without CRC support, disabled.

Because xfs/073 disables crc unconditionally and finobt can not be
enabled either.

Fix it by explicitly disabling finobt as well.

Also remove all meta related mkfs options in _scratch_mkfs_xfs_opts() if
mkfs.xfs has no metadata support, not only the crc option. So that test
still passes on distros with such old binaries.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---

v2:
- disable finobt explicitly, instead of filtering the warning

 common/rc     | 4 ++--
 tests/xfs/073 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/rc b/common/rc
index a34c387..73d2ea6 100644
--- a/common/rc
+++ b/common/rc
@@ -444,9 +444,9 @@ _scratch_mkfs_xfs_opts()
 {
 	mkfs_opts=$*
 
-	# remove crc related mkfs options if mkfs.xfs doesn't support v5 xfs
+	# remove metadata related mkfs options if mkfs.xfs doesn't them
 	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
-		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+crc=.//"`
+		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+\S\+//g"`
 	fi
 
 	_scratch_options mkfs
diff --git a/tests/xfs/073 b/tests/xfs/073
index e1335df..e2c1af3 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -138,7 +138,7 @@ _require_loop
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -m crc=0,finobt=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
 _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
 
 echo
-- 
2.5.0


WARNING: multiple messages have this Message-ID (diff)
From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: Eryu Guan <eguan@redhat.com>, xfs@oss.sgi.com
Subject: [PATCH v2] xfs/073: avoid finobt warning from mkfs
Date: Wed, 16 Mar 2016 23:04:44 +0800	[thread overview]
Message-ID: <1458140684-4723-1-git-send-email-eguan@redhat.com> (raw)
In-Reply-To: <1458129204-31882-1-git-send-email-eguan@redhat.com>

When testing xfs/073 with MKFS_OPTIONS="-m crc=1,finobt=1" set, it fails
due to extra warning about disabling finobt feature:

 +warning: finobt not supported without CRC support, disabled.

Because xfs/073 disables crc unconditionally and finobt can not be
enabled either.

Fix it by explicitly disabling finobt as well.

Also remove all meta related mkfs options in _scratch_mkfs_xfs_opts() if
mkfs.xfs has no metadata support, not only the crc option. So that test
still passes on distros with such old binaries.

Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eryu Guan <eguan@redhat.com>
---

v2:
- disable finobt explicitly, instead of filtering the warning

 common/rc     | 4 ++--
 tests/xfs/073 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/rc b/common/rc
index a34c387..73d2ea6 100644
--- a/common/rc
+++ b/common/rc
@@ -444,9 +444,9 @@ _scratch_mkfs_xfs_opts()
 {
 	mkfs_opts=$*
 
-	# remove crc related mkfs options if mkfs.xfs doesn't support v5 xfs
+	# remove metadata related mkfs options if mkfs.xfs doesn't them
 	if [ -n "$XFS_MKFS_HAS_NO_META_SUPPORT" ]; then
-		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+crc=.//"`
+		mkfs_opts=`echo $mkfs_opts | sed "s/-m\s\+\S\+//g"`
 	fi
 
 	_scratch_options mkfs
diff --git a/tests/xfs/073 b/tests/xfs/073
index e1335df..e2c1af3 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -138,7 +138,7 @@ _require_loop
 
 rm -f $seqres.full
 
-_scratch_mkfs_xfs -m crc=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -m crc=0,finobt=0 -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
 _scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
 
 echo
-- 
2.5.0

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

  parent reply	other threads:[~2016-03-16 15:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 11:53 [PATCH] xfs/073: filter out finobt warning from mkfs.xfs Eryu Guan
2016-03-16 11:53 ` Eryu Guan
2016-03-16 12:04 ` Christoph Hellwig
2016-03-16 12:04   ` Christoph Hellwig
2016-03-16 14:54   ` Eryu Guan
2016-03-16 14:54     ` Eryu Guan
2016-03-16 20:00     ` Dave Chinner
2016-03-16 20:00       ` Dave Chinner
2016-03-17  3:28       ` Eryu Guan
2016-03-17  3:28         ` Eryu Guan
2016-03-16 15:04 ` Eryu Guan [this message]
2016-03-16 15:04   ` [PATCH v2] xfs/073: avoid finobt warning from mkfs Eryu Guan

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=1458140684-4723-1-git-send-email-eguan@redhat.com \
    --to=eguan@redhat.com \
    --cc=fstests@vger.kernel.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 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.