From patchwork Fri Nov 3 04:26:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10039505 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 9BAEF602DA for ; Fri, 3 Nov 2017 04:26:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DA1529379 for ; Fri, 3 Nov 2017 04:26:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 827002945C; Fri, 3 Nov 2017 04:26:28 +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, 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 1757729379 for ; Fri, 3 Nov 2017 04:26:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750759AbdKCE0Z (ORCPT ); Fri, 3 Nov 2017 00:26:25 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:46568 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbdKCE0Y (ORCPT ); Fri, 3 Nov 2017 00:26:24 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vA34QLsi022586 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Nov 2017 04:26:22 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vA34QKLM027210 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Nov 2017 04:26:21 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 vA34QKka029519; Fri, 3 Nov 2017 04:26:20 GMT Received: from localhost (/73.25.142.12) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 02 Nov 2017 21:26:19 -0700 Date: Thu, 2 Nov 2017 21:26:19 -0700 From: "Darrick J. Wong" To: eguan@redhat.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Subject: [PATCH v2 12/14] generic/204: use available blocks to determine the number of files to create Message-ID: <20171103042619.GB1233@magnolia> References: <150957278824.18388.17975162441125293654.stgit@magnolia> <150957286222.18388.3253654888670864191.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <150957286222.18388.3253654888670864191.stgit@magnolia> User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Use the available block count to compute the number of files we think we can create, rather than hardcoding a particular size. This fixes the ENOSPC failures for xfs filesystems with rmap/reflink support. Signed-off-by: Darrick J. Wong --- tests/generic/204 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/tests/generic/204 b/tests/generic/204 index 4c203a2..ac417a7 100755 --- a/tests/generic/204 +++ b/tests/generic/204 @@ -69,7 +69,7 @@ _scratch_mount # work out correctly. Space usages is based 22500 files and 1024 reserved blocks # on a 4k block size 256 byte inode size filesystem. resv_blks=1024 -space=97920000 +space=$(stat -f -c '%f * %S' $SCRATCH_MNT | $BC_PROG) # decrease files for inode size. # 22500 * (256 + 4k) = ~97MB