From: Eryu Guan <guan@eryu.me>
To: Sun Ke <sunke32@huawei.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] generic/619: a better way to get tot_avail_size
Date: Sun, 18 Apr 2021 18:59:30 +0800 [thread overview]
Message-ID: <YHwRErNapsLoaiDD@desktop> (raw)
In-Reply-To: <20210415045102.4099962-1-sunke32@huawei.com>
On Thu, Apr 15, 2021 at 12:51:02AM -0400, Sun Ke wrote:
> When FSTYP is tmpfs, $DF_PROG --block-size=1 $SCRATCH_DEV is not suitted.
>
> Signei-off-by: Sun Ke <sunke32@huawei.com>
> ---
> tests/generic/619 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/generic/619 b/tests/generic/619
> index 3c43fe746917..76d6b2c470b9 100755
> --- a/tests/generic/619
> +++ b/tests/generic/619
> @@ -89,7 +89,7 @@ calc_thread_cnt()
> IFS=',' read -ra fratio <<< $file_ratio
> file_ratio_cnt=${#fratio[@]}
>
> - tot_avail_size=$($DF_PROG --block-size=1 $SCRATCH_DEV | awk 'FNR == 2 { print $5 }')
Does s/$SCRATCH_DEV/$SCRATCH_MNT/ work for you? And please replace 'awk'
with $AWK_PROG while we're at it.
Thanks,
Eryu
> + tot_avail_size=$(echo $($DF_PROG | grep -w $SCRATCH_DEV | awk '{print $5}')*1024 | $BC_PROG)
> avail_size=$(echo $tot_avail_size*$disk_saturation | $BC_PROG)
> thread_cnt=$(echo "$file_ratio_cnt*($avail_size/$file_ratio_unit)" | $BC_PROG)
>
> --
> 2.25.4
prev parent reply other threads:[~2021-04-18 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 4:51 [PATCH] generic/619: a better way to get tot_avail_size Sun Ke
2021-04-18 10:59 ` 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=YHwRErNapsLoaiDD@desktop \
--to=guan@eryu.me \
--cc=fstests@vger.kernel.org \
--cc=sunke32@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: 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