From patchwork Fri Sep 11 11:41:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: xuw2015@gmail.com X-Patchwork-Id: 7159821 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CA4F29F380 for ; Fri, 11 Sep 2015 11:41:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1093220861 for ; Fri, 11 Sep 2015 11:41:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 266A22035D for ; Fri, 11 Sep 2015 11:41:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751499AbbIKLlx (ORCPT ); Fri, 11 Sep 2015 07:41:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47341 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751491AbbIKLlx (ORCPT ); Fri, 11 Sep 2015 07:41:53 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 0B6A991E8F; Fri, 11 Sep 2015 11:41:53 +0000 (UTC) Received: from localhost (dhcp12-175.nay.redhat.com [10.66.12.175] (may be forged)) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8BBfpNZ001005; Fri, 11 Sep 2015 07:41:52 -0400 From: xuw2015@gmail.com To: fstests@vger.kernel.org Cc: George Wang Subject: [PATCH] generic/027: enlarge fs size for btrfs in bigger page-size machine Date: Fri, 11 Sep 2015 19:41:31 +0800 Message-Id: <1441971691-26427-1-git-send-email-xuw2015@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: George Wang btrfs on bigger page-size machine(such as ppc64/ppc64le), the min fs size shoule be more than 480MB. Otherwise, the mount will fail. So we shoud adjust the fs size to 512MB for btrfs to run this test correctly. And we also provide a double check: if mount fails, we should never run this test. Signed-off-by: George Wang --- tests/generic/027 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/generic/027 b/tests/generic/027 index d2e59d6..c42b9a6 100755 --- a/tests/generic/027 +++ b/tests/generic/027 @@ -65,8 +65,17 @@ _require_scratch rm -f $seqres.full echo "Silence is golden" -_scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1 -_scratch_mount +loop=100 +fs_size=$((256 * 1024 * 1024)) +# btrfs takes much longer time, reduce the loop count +# btrfs takes much more space when first mount on bigger page-size machine +if [ "$FSTYP" == "btrfs" ]; then + loop=10 + fs_size=$((512 * 1024 * 1024)) +fi + +_scratch_mkfs_sized $(fs_size) >>$seqres.full 2>&1 +_scratch_mount || _notrun "scratch dev is not mounted successfully" echo "Reserve 2M space" >>$seqres.full $XFS_IO_PROG -f -c "pwrite 0 2m" $SCRATCH_MNT/testfile >>$seqres.full 2>&1 @@ -75,12 +84,6 @@ $XFS_IO_PROG -f -c "pwrite 0 254m" $SCRATCH_MNT/bigfile >>$seqres.full 2>&1 echo "Remove reserved file" >>$seqres.full rm -f $SCRATCH_MNT/testfile -loop=100 -# btrfs takes much longer time, reduce the loop count -if [ "$FSTYP" == "btrfs" ]; then - loop=10 -fi - dir=$SCRATCH_MNT/testdir echo -n "iteration" >>$seqres.full i=1