From: Sun Ke <sunke32@huawei.com> To: <fstests@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>, <guan@eryu.me>, <chao@kernel.org> Cc: <sunke32@huawei.com> Subject: [PATCH v2] generic/103: special left calculation for f2fs Date: Thu, 17 Jun 2021 15:03:09 +0800 [thread overview] Message-ID: <20210617070310.3515665-1-sunke32@huawei.com> (raw) 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 <yuchao0@huawei.com> Signed-off-by: Sun Ke <sunke32@huawei.com> --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Sun Ke <sunke32@huawei.com> To: <fstests@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>, <guan@eryu.me>, <chao@kernel.org> Cc: sunke32@huawei.com Subject: [f2fs-dev] [PATCH v2] generic/103: special left calculation for f2fs Date: Thu, 17 Jun 2021 15:03:09 +0800 [thread overview] Message-ID: <20210617070310.3515665-1-sunke32@huawei.com> (raw) 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 <yuchao0@huawei.com> Signed-off-by: Sun Ke <sunke32@huawei.com> --- 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
next reply other threads:[~2021-06-17 6:57 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-17 7:03 Sun Ke [this message] 2021-06-17 7:03 ` [f2fs-dev] [PATCH v2] generic/103: special left calculation for f2fs Sun Ke 2021-06-17 7:03 ` [PATCH v2] generic/260: f2fs is also special Sun Ke 2021-06-17 7:03 ` [f2fs-dev] " Sun Ke
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210617070310.3515665-1-sunke32@huawei.com \ --to=sunke32@huawei.com \ --cc=chao@kernel.org \ --cc=fstests@vger.kernel.org \ --cc=guan@eryu.me \ --cc=linux-f2fs-devel@lists.sourceforge.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.