All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hou Tao <houtao1@huawei.com>
To: fstests@vger.kernel.org
Cc: houtao1@huawei.com
Subject: [PATCH] xfs: only set XFS_MKFS_HAS_NO_META_SUPPORT for XFS
Date: Fri, 4 Jan 2019 16:56:10 +0800	[thread overview]
Message-ID: <20190104085610.93116-1-houtao1@huawei.com> (raw)

No need to set XFS_MKFS_HAS_NO_META_SUPPORT for all filesystems.

Cc: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Hou Tao <houtao1@huawei.com>
---
 common/config | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/common/config b/common/config
index f9e932f1..f7b5b7ae 100644
--- a/common/config
+++ b/common/config
@@ -258,15 +258,17 @@ if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
 fi
 
 # check if mkfs.xfs supports v5 xfs
-XFS_MKFS_HAS_NO_META_SUPPORT=""
-touch /tmp/crc_check.img
-$MKFS_XFS_PROG -N -d file,name=/tmp/crc_check.img,size=32m -m crc=0 \
-	>/dev/null 2>&1;
-if [ $? -ne 0 ]; then
-	XFS_MKFS_HAS_NO_META_SUPPORT=true
+if [ "$FSTYP" == "xfs" ]; then
+	XFS_MKFS_HAS_NO_META_SUPPORT=""
+	touch /tmp/crc_check.img
+	$MKFS_XFS_PROG -N -d file,name=/tmp/crc_check.img,size=32m -m crc=0 \
+		>/dev/null 2>&1;
+	if [ $? -ne 0 ]; then
+		XFS_MKFS_HAS_NO_META_SUPPORT=true
+	fi
+	rm -f /tmp/crc_check.img
+	export XFS_MKFS_HAS_NO_META_SUPPORT
 fi
-rm -f /tmp/crc_check.img
-export XFS_MKFS_HAS_NO_META_SUPPORT
 
 _mount_opts()
 {
-- 
2.16.2.dirty

                 reply	other threads:[~2019-01-04  8:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190104085610.93116-1-houtao1@huawei.com \
    --to=houtao1@huawei.com \
    --cc=fstests@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 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.