From patchwork Mon Feb 27 08:23:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 9592825 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 41D78601D7 for ; Mon, 27 Feb 2017 08:32:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 32D6928434 for ; Mon, 27 Feb 2017 08:32:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2694D2843E; Mon, 27 Feb 2017 08:32:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 24AF328489 for ; Mon, 27 Feb 2017 08:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617AbdB0IcG (ORCPT ); Mon, 27 Feb 2017 03:32:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49461 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbdB0Iax (ORCPT ); Mon, 27 Feb 2017 03:30:53 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9AB184E4C6 for ; Mon, 27 Feb 2017 08:23:12 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-8-36.pek2.redhat.com [10.72.8.36]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1R8NAK8015712; Mon, 27 Feb 2017 03:23:11 -0500 From: Zorro Lang To: fstests@vger.kernel.org Cc: zlang@redhat.com Subject: [PATCH v2] common/xfs: fix unexpected failure on real 4k sector device Date: Mon, 27 Feb 2017 16:23:03 +0800 Message-Id: <1488183783-15194-1-git-send-email-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 27 Feb 2017 08:23:12 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP _xfs_mkfs_validation_check() run "$cmd -s size=2s" to be sure if xfsprogs support stricter input checks. But there's an unexpected failure on 4k sector device: # blockdev --getbsz --getpbsz --getss $dev 4096 4096 4096 # mkfs.xfs -f -N -d file,name=$tmpfile,size=1g -s size=2s illegal sector size 1024; hw sector is 4096 .... So change the sector size from '2s' to '8s' to keep away this failure. Signed-off-by: Zorro Lang --- This's the V2 of "[PATCH] common/xfs: change _xfs_mkfs_validation_check return logic", change '2s' to '8s'. Thanks, Zorro common/xfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/xfs b/common/xfs index 767a481..4bd8465 100644 --- a/common/xfs +++ b/common/xfs @@ -542,7 +542,7 @@ _xfs_mkfs_validation_check() local tmpfile=`mktemp` local cmd="$MKFS_XFS_PROG -f -N -d file,name=$tmpfile,size=1g" - $cmd -s size=2s >/dev/null 2>&1 + $cmd -s size=8s >/dev/null 2>&1 local sum=$? $cmd -l version=2,su=260k >/dev/null 2>&1