From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 815EAC2B9F4 for ; Thu, 17 Jun 2021 06:57:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6ABE46113C for ; Thu, 17 Jun 2021 06:57:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbhFQG7I (ORCPT ); Thu, 17 Jun 2021 02:59:08 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:7316 "EHLO szxga08-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbhFQG7H (ORCPT ); Thu, 17 Jun 2021 02:59:07 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4G5CQh40CTz1BN8R; Thu, 17 Jun 2021 14:51:56 +0800 (CST) Received: from dggema759-chm.china.huawei.com (10.1.198.201) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Thu, 17 Jun 2021 14:56:58 +0800 Received: from huawei.com (10.175.101.6) by dggema759-chm.china.huawei.com (10.1.198.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 17 Jun 2021 14:56:57 +0800 From: Sun Ke To: , , , CC: Subject: [PATCH v2] generic/103: special left calculation for f2fs Date: Thu, 17 Jun 2021 15:03:09 +0800 Message-ID: <20210617070310.3515665-1-sunke32@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggema759-chm.china.huawei.com (10.1.198.201) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org It failed on f2fs: QA output created by 103 +fallocate: No space left on device Silence is golden. ... f2fs uses index(radix) tree as mapping metadata, its space overhead is about one thousandth of the data. Suggested-by: Chao Yu Signed-off-by: Sun Ke --- tests/generic/103 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/generic/103 b/tests/generic/103 index b22b0159..cf610047 100755 --- a/tests/generic/103 +++ b/tests/generic/103 @@ -40,10 +40,18 @@ rm -f $seqres.full _consume_freesp() { file=$1 + left=512 # consume nearly all available space (leave ~512kB) avail=`_get_available_space $SCRATCH_MNT` - filesizekb=$((avail / 1024 - 512)) + + # f2fs uses index(radix) tree as mapping metadata, its space overhead + # is about one thousandth of the data + if [ $FSTYP == "f2fs" ]; then + left=$((left + avail / 1024000)) + fi + + filesizekb=$((avail / 1024 - $left)) $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file } -- 2.13.6 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 669AFC2B9F4 for ; Thu, 17 Jun 2021 06:57:15 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2ADB4610EA for ; Thu, 17 Jun 2021 06:57:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2ADB4610EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.92.3) (envelope-from ) id 1ltlxg-0001Yq-TF; Thu, 17 Jun 2021 06:57:12 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1ltlxf-0001Yf-HM for linux-f2fs-devel@lists.sourceforge.net; Thu, 17 Jun 2021 06:57:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: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=7LKs2thIpBB5iCvv1y/TkXLZGwaqucWCGbFNRu+nTVo=; b=a2SUfzAwIek6NzM9jER0blQY4r nrxkOWbl5Lp334vRP2ijWBEfN5yTFGquzHvAIycA7CI4uVGUK/WpPwlKTO7vMR98k4G7/sqNNoyHN MQ5pWw3CEyNccAA9jljxLZPje7lXWtZ8YV68Lu98mfEeU/AXX7axnQK6Cu8XsUFXC/aU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date: Subject:CC:To:From:Sender:Reply-To: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=7LKs2thIpBB5iCvv1y/TkXLZGwaqucWCGbFNRu+nTVo=; b=J StLvJTuXX1pgDyZP5Ix5wcq40rVNuajqsP+fgPqnuZC4f0q+Sem65nlVx3VyPYWCKYpCOkyS80tU8 hLUE1yhy4E4m2F2A3dH/vqte55LL72JI585F7G67+1E0QUnQfBpFu+2/oyAfUMKHiegYvyPOXvJj6 YzRiZtNo1xpaH/Kc=; Received: from szxga08-in.huawei.com ([45.249.212.255]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1ltlxb-0007oI-Rm for linux-f2fs-devel@lists.sourceforge.net; Thu, 17 Jun 2021 06:57:11 +0000 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4G5CQh40CTz1BN8R; Thu, 17 Jun 2021 14:51:56 +0800 (CST) Received: from dggema759-chm.china.huawei.com (10.1.198.201) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Thu, 17 Jun 2021 14:56:58 +0800 Received: from huawei.com (10.175.101.6) by dggema759-chm.china.huawei.com (10.1.198.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 17 Jun 2021 14:56:57 +0800 From: Sun Ke To: , , , Date: Thu, 17 Jun 2021 15:03:09 +0800 Message-ID: <20210617070310.3515665-1-sunke32@huawei.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggema759-chm.china.huawei.com (10.1.198.201) X-CFilter-Loop: Reflected X-Headers-End: 1ltlxb-0007oI-Rm Subject: [f2fs-dev] [PATCH v2] generic/103: special left calculation for f2fs X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sunke32@huawei.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net It failed on f2fs: QA output created by 103 +fallocate: No space left on device Silence is golden. ... f2fs uses index(radix) tree as mapping metadata, its space overhead is about one thousandth of the data. Suggested-by: Chao Yu Signed-off-by: Sun Ke --- tests/generic/103 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/generic/103 b/tests/generic/103 index b22b0159..cf610047 100755 --- a/tests/generic/103 +++ b/tests/generic/103 @@ -40,10 +40,18 @@ rm -f $seqres.full _consume_freesp() { file=$1 + left=512 # consume nearly all available space (leave ~512kB) avail=`_get_available_space $SCRATCH_MNT` - filesizekb=$((avail / 1024 - 512)) + + # f2fs uses index(radix) tree as mapping metadata, its space overhead + # is about one thousandth of the data + if [ $FSTYP == "f2fs" ]; then + left=$((left + avail / 1024000)) + fi + + filesizekb=$((avail / 1024 - $left)) $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file } -- 2.13.6 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel