From patchwork Mon Sep 24 10:16:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 10612175 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 6E25B913 for ; Mon, 24 Sep 2018 10:16:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B20529EFD for ; Mon, 24 Sep 2018 10:16:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D98D29EEC; Mon, 24 Sep 2018 10:16:45 +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 E49A629EFA for ; Mon, 24 Sep 2018 10:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728192AbeIXQSD (ORCPT ); Mon, 24 Sep 2018 12:18:03 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:36862 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727524AbeIXQSD (ORCPT ); Mon, 24 Sep 2018 12:18:03 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8OAEbVe053015; Mon, 24 Sep 2018 10:16:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=tJ1GWEJjqumntHINNmta9XtW5dw71Cfg37e2sSNvQ9Q=; b=IAdR1xV98KMlyeyCLPno7c3QjaWMGZ0smOsHnscuGatqhXEKfyk9joG8EItmg/QVeHH2 3el4LAUOYtf/80scr14VaqoChldf0BtH0aWZQto80HnYzXnrqvHCplfUwb2uMb/G1ktd VUhDQYqXQ4DSoF8qWoOYAwMuwjlP+XAbdcrwG5ztsxLaVhqdn3N/hIEEdmRZ9ew8c1Zp dyT94t795/0wGD21aiejC1JqE7HURNFWGPe2Z3SlCoh7k0HGrPO7NRSZoDrMR+LNUaoS s1kLd6Q0veouUh1FFeKA+vUB0DCukA/iUWtTLGILMrB3V3L4qYyXYWt1VmIG2cIJejnh UA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2mnvtubfhx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Sep 2018 10:16:42 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w8OAGfLa017423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Sep 2018 10:16:41 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8OAGfYo032185; Mon, 24 Sep 2018 10:16:41 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:40 -0700 From: Anand Jain To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Subject: [PATCH 0/9] Fix _scratch_mkfs_sized() for btrfs Date: Mon, 24 Sep 2018 18:16:24 +0800 Message-Id: <1537784193-24431-1-git-send-email-anand.jain@oracle.com> X-Mailer: git-send-email 1.8.3.1 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=660 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809240108 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently _scratch_mkfs_sized() checks if requested size for the fs is below 1G for btrfs and forces the --mixed mkfs option. The 1G size cut off is too larger where the actual size is 114294784 bytes. The patch 1/9 fixes the _scratch_mkfs_sized() to check for 114294784 bytes instead. By this now we test the default config (non mixed). And the mixed option may still be tested using the MKFS_OPTIONS. This change only affect btrfs FS and test cases using the _scratch_mkfs_sized() in generic and btrfs. Also, to make sure btrfs is created in non-mixed mode, so in each individual test cases we need to make sure that _scratch_mkfs_sized() been requested to create a FS of at least 200mb in size (114294784 bytes rounded off to the nearest 100). And there are few test cases which does not do that, Patches [2,3,4,8,9]/9 fixes them. These changes affects all FS as such. And there are some test cases where we use local variable as an option for the _scratch_mkfs_sized() is being used and this local variable is not used anywhere else with in the test case. So patches [5,6,7]/9 drops the local variable and open codes it. This is a straight forward change as the fs size is kept same as in the original. Further, there are test cases generic/250,252,256 which uses _scratch_mkfs_sized with < 200mb but its fix isn't straight forward and they are not yet ready for the review. The affected testcases (which calls _scratch_mkfs_sized) [1] have been tested with xfs/ext4 and btrfs. And there are no regressions. [1] generic/015 generic/027 generic/077 generic/081 generic/083 generic/085 generic/096 generic/102 generic/171 generic/172 generic/173 generic/174 generic/204 generic/224 generic/226 generic/250 generic/252 generic/256 generic/269 generic/270 generic/273 generic/274 generic/275 generic/300 generic/312 generic/320 generic/333 generic/334 generic/361 generic/371 generic/387 generic/399 generic/416 generic/427 generic/449 generic/459 generic/466 generic/488 generic/505 btrfs/004 btrfs/007 btrfs/132 btrfs/170 Anand Jain (9): fstests: btrfs: _scratch_mkfs_sized fix min size without mixed option generic/015 fix to test the default non-mixed mode geneirc/077 fix min size for btrfs generic/083 create at least 200mb fs generic/102 open code dev_size _scratch_mkfs_sized() generic/204 open code SIZE for _scratch_mkfs_sized() generic/312 open code fs_size _scratch_mkfs_sized() generic/449 fix fs size for _scratch_mkfs_sized for btrfs generic/387 fix _scratch_mkfs_sized option for btrfs common/rc | 4 +++- tests/generic/015 | 9 ++++----- tests/generic/077 | 3 +-- tests/generic/083 | 2 +- tests/generic/102 | 3 +-- tests/generic/204 | 3 +-- tests/generic/312 | 7 +++---- tests/generic/387 | 3 ++- tests/generic/449 | 4 ++-- 9 files changed, 18 insertions(+), 20 deletions(-)