From: Dave Chinner <david@fromorbit.com>
To: Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] generic: create and delete files repeatedly to exercise ENOSPC behaviour
Date: Wed, 2 Nov 2016 12:27:13 +1100 [thread overview]
Message-ID: <20161102012713.GE9920@dastard> (raw)
In-Reply-To: <1477999170-20026-1-git-send-email-wangxg.fnst@cn.fujitsu.com>
On Tue, Nov 01, 2016 at 07:19:30PM +0800, Wang Xiaoguang wrote:
> In btrfs, sometimes though the number of created files' consumed disk space
> are not larger than fs's free space, we can still get some ENOSPC error, it
> may be that btrfs does not try hard to reclaim disk space(I have sent kernel
> patch to resolve this kind of enospc error. Note, this false enospc error
> will not always happen even in kernel without my fixing patch).
>
> Currently only in btrfs, I get this ENOSPC error, xfs and ext4 work well.
.....
> +RUN_TIME=$((600 * $TIME_FACTOR))
> +fs_size=$((15 * 1024 * 1024 * 1024))
> +_scratch_mkfs_sized $fs_size > $seqres.full 2>&1
> +_scratch_mount > $seqres.full 2>&1
> +
> +testfile1=$SCRATCH_MNT/testfile1
> +testfile2=$SCRATCH_MNT/testfile2
> +filesize1=$(((fs_size * 80) / 100))
> +filesize2=$(((fs_size * 5) / 100))
> +
> +do_test()
> +{
> + while [ -f $SCRATCH_MNT/run ]; do
> + $XFS_IO_PROG -fc "pwrite 0 $filesize1" $testfile1 > /dev/null
> + $XFS_IO_PROG -fc "pwrite 0 $filesize2" $testfile2 > /dev/null
> + rm -f $testfile1 $testfile2
> + done
> +}
What are you trying to test here that other ENOSPC tests
don't exercise? Why cant you just use preallocation to trigger
ENOSPC repeatedly instead of writing data? That would allow multiple
iterations per second, not one every few minutes...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2016-11-02 1:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 11:19 [PATCH] generic: create and delete files repeatedly to exercise ENOSPC behaviour Wang Xiaoguang
2016-11-01 12:26 ` Eryu Guan
2016-11-02 10:22 ` Wang Xiaoguang
2016-11-02 10:36 ` Eryu Guan
2016-11-02 1:27 ` Dave Chinner [this message]
2016-11-02 10:24 ` Wang Xiaoguang
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=20161102012713.GE9920@dastard \
--to=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=wangxg.fnst@cn.fujitsu.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox