From: Chao Yu <chao@kernel.org> To: Sun Ke <sunke32@huawei.com>, linux-f2fs-devel@lists.sourceforge.net Cc: fstests@vger.kernel.org, guan@eryu.me, yuchao0@huawei.com Subject: Re: [f2fs-dev] [PATCH] generic/103: leave more space for f2fs Date: Wed, 16 Jun 2021 21:15:37 +0800 [thread overview] Message-ID: <aa3fef51-5633-800a-1d93-cbfb66453c2a@kernel.org> (raw) In-Reply-To: <1ea6a853-d892-4c3e-d023-72adc379b803@huawei.com> On 2021/6/15 11:28, Sun Ke wrote: > to linux-f2fs-devel@lists.sourceforge.net > > 在 2021/6/11 19:22, Sun Ke 写道: >> It failed on f2fs: >> QA output created by 103 >> +fallocate: No space left on device >> Silence is golden. >> ... >> >> Try to leave ~512KB, but during the fallocate, f2fs will be filled. >> Provide error prompt: "fallocate: No space left on device". >> >> Leave more space for f2fs. >> >> Signed-off-by: Sun Ke <sunke32@huawei.com> >> --- >> I add some test code >> + df >> avail=`_get_available_space $SCRATCH_MNT` >> + echo "avail = ${avail}" >> filesizekb=$((avail / 1024 - 512)) >> + echo "filesizekb = ${filesizekb}" >> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file >> + df >> } >> >> f2fs: >> QA output created by 103 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch >> +avail = 12316233728 >> +filesizekb = 12027060 >> +fallocate: No space left on device >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch >> Silence is golden. >> >> xfs: >> QA output created by 103 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch >> +avail = 12750688256 >> +filesizekb = 12451332 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch >> Silence is golden. >> >> ext4: >> QA output created by 103 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch >> +avail = 11912503296 >> +filesizekb = 11632792 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch >> Silence is golden. >> >> after change (f2fs) >> QA output created by 103 >> Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> /dev/sdb 12580864 12580396 468 100% /tmp/scratch >> Silence is golden. >> >> tests/generic/103 | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/tests/generic/103 b/tests/generic/103 >> index b22b0159623e..dfce3870781c 100755 >> --- a/tests/generic/103 >> +++ b/tests/generic/103 >> @@ -40,10 +40,18 @@ rm -f $seqres.full >> _consume_freesp() >> { >> file=$1 >> + leave=512 >> + >> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled. >> + # Provide error prompt: "fallocate: No space left on device". Leave >> + # more space for f2fs. >> + if [ $FSTYP == "f2fs" ]; then >> + leave=12288 >> + fi >> # consume nearly all available space (leave ~512kB) >> avail=`_get_available_space $SCRATCH_MNT` if [ $FSTYP == "f2fs" ]; then left=$((left + avail / 1024000)) fi f2fs uses index(radix) tree as mapping metadata, its space overhead is about one thousandth of the data, so can you please try above calculation? Thanks, >> - filesizekb=$((avail / 1024 - 512)) >> + filesizekb=$((avail / 1024 - $leave)) >> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file >> } >> > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao@kernel.org> To: Sun Ke <sunke32@huawei.com>, linux-f2fs-devel@lists.sourceforge.net Cc: guan@eryu.me, fstests@vger.kernel.org Subject: Re: [f2fs-dev] [PATCH] generic/103: leave more space for f2fs Date: Wed, 16 Jun 2021 21:15:37 +0800 [thread overview] Message-ID: <aa3fef51-5633-800a-1d93-cbfb66453c2a@kernel.org> (raw) In-Reply-To: <1ea6a853-d892-4c3e-d023-72adc379b803@huawei.com> On 2021/6/15 11:28, Sun Ke wrote: > to linux-f2fs-devel@lists.sourceforge.net > > 在 2021/6/11 19:22, Sun Ke 写道: >> It failed on f2fs: >> QA output created by 103 >> +fallocate: No space left on device >> Silence is golden. >> ... >> >> Try to leave ~512KB, but during the fallocate, f2fs will be filled. >> Provide error prompt: "fallocate: No space left on device". >> >> Leave more space for f2fs. >> >> Signed-off-by: Sun Ke <sunke32@huawei.com> >> --- >> I add some test code >> + df >> avail=`_get_available_space $SCRATCH_MNT` >> + echo "avail = ${avail}" >> filesizekb=$((avail / 1024 - 512)) >> + echo "filesizekb = ${filesizekb}" >> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file >> + df >> } >> >> f2fs: >> QA output created by 103 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12580864 553292 12027572 5% /mnt/scratch >> +avail = 12316233728 >> +filesizekb = 12027060 >> +fallocate: No space left on device >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12580864 12580864 0 100% /mnt/scratch >> Silence is golden. >> >> xfs: >> QA output created by 103 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12572672 120828 12451844 1% /mnt/scratch >> +avail = 12750688256 >> +filesizekb = 12451332 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12572672 12572160 512 100% /mnt/scratch >> Silence is golden. >> >> ext4: >> QA output created by 103 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12319880 41048 11633304 1% /mnt/scratch >> +avail = 11912503296 >> +filesizekb = 11632792 >> +Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> +/dev/sdb 12319880 11673844 508 100% /mnt/scratch >> Silence is golden. >> >> after change (f2fs) >> QA output created by 103 >> Filesystem 1K-blocks Used Available Use% Mounted on >> ... >> /dev/sdb 12580864 12580396 468 100% /tmp/scratch >> Silence is golden. >> >> tests/generic/103 | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/tests/generic/103 b/tests/generic/103 >> index b22b0159623e..dfce3870781c 100755 >> --- a/tests/generic/103 >> +++ b/tests/generic/103 >> @@ -40,10 +40,18 @@ rm -f $seqres.full >> _consume_freesp() >> { >> file=$1 >> + leave=512 >> + >> + # Try to leave ~512KB, but during the fallocate, f2fs will be filled. >> + # Provide error prompt: "fallocate: No space left on device". Leave >> + # more space for f2fs. >> + if [ $FSTYP == "f2fs" ]; then >> + leave=12288 >> + fi >> # consume nearly all available space (leave ~512kB) >> avail=`_get_available_space $SCRATCH_MNT` if [ $FSTYP == "f2fs" ]; then left=$((left + avail / 1024000)) fi f2fs uses index(radix) tree as mapping metadata, its space overhead is about one thousandth of the data, so can you please try above calculation? Thanks, >> - filesizekb=$((avail / 1024 - 512)) >> + filesizekb=$((avail / 1024 - $leave)) >> $XFS_IO_PROG -fc "falloc 0 ${filesizekb}k" $file >> } >> > > > _______________________________________________ > Linux-f2fs-devel mailing list > Linux-f2fs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2021-06-16 13:15 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-11 11:22 [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke 2021-06-11 11:22 ` [PATCH] generic/103: leave more space for f2fs Sun Ke 2021-06-13 14:44 ` Eryu Guan 2021-06-15 3:36 ` Sun Ke 2021-06-15 3:28 ` Sun Ke 2021-06-15 3:28 ` [f2fs-dev] " Sun Ke 2021-06-16 13:15 ` Chao Yu [this message] 2021-06-16 13:15 ` Chao Yu 2021-06-17 6:22 ` Sun Ke 2021-06-17 6:22 ` Sun Ke 2021-06-11 11:22 ` [PATCH] generic/260: f2fs is also special Sun Ke 2021-06-15 3:29 ` Sun Ke 2021-06-15 3:29 ` [f2fs-dev] " Sun Ke 2021-06-16 13:43 ` Chao Yu 2021-06-16 13:43 ` Chao Yu 2021-06-17 6:38 ` Sun Ke 2021-06-17 6:38 ` Sun Ke 2021-06-15 3:25 ` [PATCH] common/rc: f2fs do not support metadata journaling Sun Ke 2021-06-15 3:25 ` [f2fs-dev] " Sun Ke 2021-06-16 12:36 ` Chao Yu 2021-06-16 12:36 ` Chao Yu 2021-06-17 3:45 ` Sun Ke 2021-06-17 3:45 ` Sun Ke 2021-06-17 23:46 ` Chao Yu 2021-06-17 23:46 ` Chao Yu 2021-06-18 2:03 ` Sun Ke 2021-06-18 2:03 ` 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=aa3fef51-5633-800a-1d93-cbfb66453c2a@kernel.org \ --to=chao@kernel.org \ --cc=fstests@vger.kernel.org \ --cc=guan@eryu.me \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=sunke32@huawei.com \ --cc=yuchao0@huawei.com \ /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.