From patchwork Tue Sep 27 15:23:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 9352093 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 0126F600CB for ; Tue, 27 Sep 2016 15:23:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E69F228ABD for ; Tue, 27 Sep 2016 15:23:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB683291EE; Tue, 27 Sep 2016 15:23:50 +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 7C55D28ABD for ; Tue, 27 Sep 2016 15:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933655AbcI0PXl (ORCPT ); Tue, 27 Sep 2016 11:23:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45666 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933854AbcI0PXj (ORCPT ); Tue, 27 Sep 2016 11:23:39 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 8344785547 for ; Tue, 27 Sep 2016 15:23:38 +0000 (UTC) Received: from localhost (vpn1-6-169.pek2.redhat.com [10.72.6.169]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8RFNaIx000419; Tue, 27 Sep 2016 11:23:37 -0400 From: Zorro Lang To: fstests@vger.kernel.org Cc: Zorro Lang Subject: [PATCH] xfs/032: avoid making a 512b block size V5 xfs Date: Tue, 27 Sep 2016 23:23:35 +0800 Message-Id: <1474989815-8202-1-git-send-email-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 27 Sep 2016 15:23:38 +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 If test on a 512b sector size device, xfs/032 will try to do: mkfs.xfs -s size=512 -b size=512 ... The 512b block size is not acceptable for V5 XFS. So I change the minimum block size to 1024 if (crc = 1 && sector size < 1024). Signed-off-by: Zorro Lang --- tests/xfs/032 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/xfs/032 b/tests/xfs/032 index 6216379..487dbd9 100755 --- a/tests/xfs/032 +++ b/tests/xfs/032 @@ -34,6 +34,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 # get standard environment, filters and checks . ./common/rc +. ./common/filter # real QA test starts here _supported_fs xfs @@ -50,11 +51,22 @@ rm -f $seqres.full SECTORSIZE=`blockdev --getss $SCRATCH_DEV` PAGESIZE=`src/feature -s` IMGFILE=$TEST_DIR/${seq}_copy.img +MIN_BLKSIZE=$SECTORSIZE + +if [ $MIN_BLKSIZE -lt 1024 ]; then + _scratch_mkfs_sized $((512 * 1024 * 1024)) | _filter_mkfs \ + 2>$tmp.mkfs >/dev/null + . $tmp.mkfs + if [ $_fs_has_crcs -eq 1 ]; then + MIN_BLKSIZE=1024 + fi + rm -f $tmp.mkfs +fi echo "Silence is golden." while [ $SECTORSIZE -le $PAGESIZE ]; do - BLOCKSIZE=$SECTORSIZE; + BLOCKSIZE=$MIN_BLKSIZE; while [ $BLOCKSIZE -le $PAGESIZE ]; do