From: Eryu Guan <guan@eryu.me>
To: XiaoLi Feng <xifeng@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH v1] generic/275: use free block counts to check if fs is filled sufficiently.
Date: Sun, 6 Dec 2020 21:54:36 +0800 [thread overview]
Message-ID: <20201206135436.GW3853@desktop> (raw)
In-Reply-To: <20201202102731.22350-1-xifeng@redhat.com>
On Wed, Dec 02, 2020 at 06:27:31PM +0800, Xiaoli Feng wrote:
> From: Xiaoli Feng <xifeng@redhat.com>
>
> For large block size, such as 64k, there're maybe leave more than 768k
> space when disk is full. I met one. When I test 64k for dax. It leaves
> about 800k space when disk is full. So change to jude the free block
> for >4k fs.
I'm not sure if that's a bug in the filesystem, and the test is designed
to find such bugs. Would you please make sure if that's a bug or not
first? Maybe by asking in proper mailing list.
Thanks,
Eryu
> ---
> tests/generic/275 | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/tests/generic/275 b/tests/generic/275
> index 3a016037..2c5a807f 100755
> --- a/tests/generic/275
> +++ b/tests/generic/275
> @@ -62,9 +62,16 @@ rm -f $SCRATCH_MNT/tmp1
> sync
> echo "Post rm space:" >> $seqres.full
> $DF_PROG $SCRATCH_MNT >>$seqres.full 2>&1
> -_freespace=`$DF_PROG -k $SCRATCH_MNT | tail -n 1 | awk '{print $5}'`
> -[ $_freespace -gt 1024 ] && _fail "could not sufficiently fill filesystem"
> -
> +bsize=$(_get_file_block_size $SCRATCH_MNT)
> +bsize=$((bsize / 1024))
> +_freespace=`$DF_PROG -k $SCRATCH_MNT | tail -n 1 | awk '{print $5}'`
> +# When block size is >4k, use the free counts of block to judge
> +if [ "$bsize" -gt 4 ]; then
> + _freeblock=$((_freespace / bsize))
> + [ "$_freeblock" -gt 256 ] && _fail "could not sufficiently fill filesystem"
> +else
> + [ "$_freespace" -gt 1024 ] && _fail "could not sufficiently fill filesystem"
> +fi
> # Try to write more than available space in chunks that will allow at least one
> # full write to succeed.
> dd if=/dev/zero of=$SCRATCH_MNT/tmp1 bs=128k count=8 >>$seqres.full 2>&1
> --
> 2.18.1
prev parent reply other threads:[~2020-12-06 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 10:27 [PATCH v1] generic/275: use free block counts to check if fs is filled sufficiently XiaoLi Feng
2020-12-06 13:54 ` Eryu Guan [this message]
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=20201206135436.GW3853@desktop \
--to=guan@eryu.me \
--cc=fstests@vger.kernel.org \
--cc=xifeng@redhat.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 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.