From patchwork Tue Feb 28 00:52:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9594529 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 077D260574 for ; Tue, 28 Feb 2017 01:15:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE389284CB for ; Tue, 28 Feb 2017 01:15:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E303A2849F; Tue, 28 Feb 2017 01:15:39 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 92071284CB for ; Tue, 28 Feb 2017 01:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419AbdB1BPi (ORCPT ); Mon, 27 Feb 2017 20:15:38 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:57416 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751560AbdB1BPh (ORCPT ); Mon, 27 Feb 2017 20:15:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0Ej7QO9vjts3sRfWPynLKcQUhKMAFQVDww3fbCtmIcc=; b=Vwrx/YsXT7ydL5cRPTunT+GG3 u7T7LAztM18o0PZJxonwQedMOO1PLm3bJntE4Us4OFCWKrxMUgxeu7TIOhVxZfVAVadzATb5/Egj+ Ilo/pHAWH3AeZhgdgH3H6GumEqKROfPiiFWOt/D7lY5frAB7y8H3MGXLQ7KPCFkkO6pYw82iZiVQT lloZGea1uWpv8ZT1i1rjM1Vpqm/WDLuHbcjbR5Zq5ZGDjjDkLjDARjGcTuJL5LhCTlTBAqQ2f6Udv tRCn0bSuY0vKT7mQHZCikR/XIWrwPRfBqwhbGODbOuqrOppCfO3pyrewYyBEyM+HtjjginKZf00yp 0fYLS8a9w==; Received: from [8.25.222.2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1ciW1r-0007Ya-Ou; Tue, 28 Feb 2017 00:52:35 +0000 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH] xfs/004: relax freespace check Date: Mon, 27 Feb 2017 16:52:35 -0800 Message-Id: <20170228005235.9839-1-hch@lst.de> X-Mailer: git-send-email 2.11.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Just check for a greater equals relation so that we don't have to adjust the test for every new reservation scheme we add.. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- tests/xfs/004 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/xfs/004 b/tests/xfs/004 index bbc1aee3..f27f4b79 100755 --- a/tests/xfs/004 +++ b/tests/xfs/004 @@ -83,18 +83,15 @@ eval `$XFS_IO_PROG -x -c resblks $SCRATCH_MNT 2>&1 \ echo "resblks gave: resblks=$resblks" >>$seqres.full # check the 'blocks' field from freesp command is OK -# - starting with Linux 4.10-rc the bmbt split reservation moved to be per-AG perl -ne ' BEGIN { $avail ='$avail' * 512 + ('$resblks' * '$dbsize'); $answer="(no xfs_db free blocks line?)" } /free blocks (\d+)$/ || next; $freesp = $1 * '$dbsize'; - if ($freesp == $avail + ('$agcount') * '$dbsize' * 8) { - $answer = "yes"; - } elsif ($freesp == $avail + (('$agcount' + 1) * '$dbsize' * 4)) { + if ($freesp >= $avail) { $answer = "yes"; } else { - $answer = "no ($freesp != $avail)"; + $answer = "no ($freesp < $avail)"; } END { print "$answer\n" } ' <$tmp.xfs_db >$tmp.ans