From patchwork Tue Sep 25 04:24:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 10613311 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 A0B88913 for ; Tue, 25 Sep 2018 04:24:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92BBB29A6F for ; Tue, 25 Sep 2018 04:24:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8749129A77; Tue, 25 Sep 2018 04:24: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=-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=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 3EED629A6F for ; Tue, 25 Sep 2018 04:24:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727588AbeIYKaJ (ORCPT ); Tue, 25 Sep 2018 06:30:09 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:51016 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727504AbeIYKaI (ORCPT ); Tue, 25 Sep 2018 06:30:08 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8P4OWvt178472; Tue, 25 Sep 2018 04:24:32 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=kR++40L9NjSSxQrBfXvUjFTb/oMiDm5LsUGeqvmYtxM=; b=G9DCFinAgWcf9Qxi2qtSGOQcb4NjjPga0eciKretW2litMEi4JyU7FgwYU7ehD+6FaV+ 0L1ZIikdS6nOYDr1yxxF1hn0IEX+73keVQ1HeNh0SieO6nj3qv76mfrvKwxHBVjgKfyV NqjnvVfdcrR0G4Xnjcdp551UOrh/K2UcdjuwTck7gX/WOJY9dRVo+soQnpq6xsI3TrDk mdWIi2FcykDgFkRvEA3RzDxqFqtY45BNPPUMhslgFqO/P0Y8QFSRL7gjfUowb4ulrOfl Tts3cHu0ti70c0+TQFwkd1YBBD4lve3XnjBF3Bni11YtArcbjJHTKxQ70/DsMtxQae3Q Vw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2mnd5t9g9y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Sep 2018 04:24:32 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8P4OVKZ008723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Sep 2018 04:24:31 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w8P4OVD8005505; Tue, 25 Sep 2018 04:24:31 GMT Received: from tpasj.sg.oracle.com (/10.186.50.4) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Sep 2018 21:24:31 -0700 From: Anand Jain To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Subject: [PATCH v2 1/9] fstests: btrfs: _scratch_mkfs_sized fix min size without mixed option Date: Tue, 25 Sep 2018 12:24:14 +0800 Message-Id: <1537849462-619-2-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1537849462-619-1-git-send-email-anand.jain@oracle.com> References: <1537849462-619-1-git-send-email-anand.jain@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9026 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=13 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=691 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809250044 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As of now _scratch_mkfs_sized() checks if the requested size is below 1G and forces the --mixed option for the mkfs.btrfs. Well the correct size considering all possible group profiles at which we need to force the mixed option is roughly 256Mbytes. So fix that. Signed-off-by: Anand Jain --- common/rc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index d5bb1feee2c3..90dc3002bc3d 100644 --- a/common/rc +++ b/common/rc @@ -969,7 +969,10 @@ _scratch_mkfs_sized() ;; btrfs) local mixed_opt= - (( fssize <= 1024 * 1024 * 1024 )) && mixed_opt='--mixed' + # minimum size that's needed without the mixed option. + # Ref: btrfs-prog: btrfs_min_dev_size() + # Non mixed mode is also the default option. + (( fssize < $((256 * 1024 *1024)) )) && mixed_opt='--mixed' $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV ;; jfs)