From patchwork Mon Sep 24 10:16:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 10612197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54951157B for ; Mon, 24 Sep 2018 10:16:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4773429EEC for ; Mon, 24 Sep 2018 10:16:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C34C29EFE; Mon, 24 Sep 2018 10:16:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable 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 E61E929EEC for ; Mon, 24 Sep 2018 10:16:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728497AbeIXQSG (ORCPT ); Mon, 24 Sep 2018 12:18:06 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:36348 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbeIXQSF (ORCPT ); Mon, 24 Sep 2018 12:18:05 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8OAEaKV107575; Mon, 24 Sep 2018 10:16:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=F60r6Tczj+ogQwpKIAraU4TpqthEWzpyIJIY8UiLCyE=; b=w+v1r/pED495cHnFEDIiVLUa1/vhNA0TeD+DzFj0wNXRr5kIXzsikZCwm+MSMDLqSPCr K0rPB+U6gfcpa+DeJncNuCdbjlnphZih9lR70AZw1EIhJCHjG2QSd59FY3I6cELExHmI E/K1VoPwZ36/dBxLLr+rzAKHKw3fMggpPAckb+J31FAt5BCc91YCrDStop+hN3EhafLs urXQ32QPxiv8a5Wryp0euSoNbZNaFqbos1EekPefOII6kViuL0dAKzKzx4P7XQ/5DHAt GETMIgSMLPW0e6WHT8aJc7CLOFkf/acvMd/+/RNPMMAZP/fATHevZOgC36eoU/5iGnKw rA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2mndpp4rh3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Sep 2018 10:16:45 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w8OAGiv2031164 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Sep 2018 10:16:44 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8OAGi2V010074; Mon, 24 Sep 2018 10:16:44 GMT Received: from tpasj.sg.oracle.com (/10.186.50.4) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Sep 2018 03:16:43 -0700 From: Anand Jain To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Subject: [PATCH 2/9] generic/015 fix to test the default non-mixed mode Date: Mon, 24 Sep 2018 18:16:26 +0800 Message-Id: <1537784193-24431-3-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1537784193-24431-1-git-send-email-anand.jain@oracle.com> References: <1537784193-24431-1-git-send-email-anand.jain@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9025 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809240108 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP commit 97575acd7495 (generic/015: Change the test filesystem size to 101mb), created 101mb FS instead of 100mb FS to make sure we create a FS which is non mixed mode, which is our default mode. btrfs-progs commit 18e2663db3e1 (btrfs-progs: Add minimum device size check) added a more accurate minimum required space to create the btrfs FS in non mixed mode. Which is at 14294784 bytes. So this patch changes the FS size to be created by _scratch_sized_mkfs to 200mb so that we create the FS in non mixed mode. To test mixed blockgroup its better we set it using the MKFS_OPTIONS explicitly. Signed-off-by: Anand Jain --- tests/generic/015 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/generic/015 b/tests/generic/015 index 0f4d29800f4f..14941ab6d552 100755 --- a/tests/generic/015 +++ b/tests/generic/015 @@ -37,11 +37,10 @@ _supported_os Linux _require_scratch _require_no_large_scratch_dev -# With filesystems less than 100mb btrfs is created in mixed mode -# which can lead to slight accounting errors of 1mb. Having the -# fs be at least 101 mb ensures those errors are within the error -# tolerance of 1% -_scratch_mkfs_sized `expr 101 \* 1024 \* 1024` >/dev/null 2>&1 \ +# With filesystems less than ~200mb _scratch_mkfs_sized will create +# data and metadata mixed mode btrfs, so use 200mb so that we test +# the default btrfs. +_scratch_mkfs_sized $((200 * 1024 * 1024)) >> $seqres.full 2>&1 \ || _fail "mkfs failed" _scratch_mount out=$SCRATCH_MNT/fillup.$$