No need to set XFS_MKFS_HAS_NO_META_SUPPORT for all filesystems. Cc: Dave Chinner <dchinner@xxxxxxxxxx> Signed-off-by: Hou Tao <houtao1@xxxxxxxxxx> --- 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