From: Timothy Shimmin <tes@sgi.com>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>,
asg-qa <asg-qa@melbourne.sgi.com>
Subject: Re: Review: fix test 004 to account for reserved space
Date: Fri, 15 Jun 2007 17:33:24 +1000 [thread overview]
Message-ID: <467240C4.1090700@sgi.com> (raw)
In-Reply-To: <20070615062335.GO86004887@sgi.com>
I have to go home now, but I'll look at this one soon.
--Tim
David Chinner wrote:
> Ping?
>
> On Mon, Jun 04, 2007 at 04:33:28PM +1000, David Chinner wrote:
>> With the changes to use some space by default in only in memory
>> as a reserved pool, df and statfs will now output a fre block
>> count that is slightly different to what is held in the superblock.
>>
>> Update the qa test to account for this change.
>>
>> Cheers,
>>
>> Dave.
>> --
>> Dave Chinner
>> Principal Engineer
>> SGI Australian Software Group
>>
>> ---
>> xfstests/004 | 35 +++++++++++++++++++++++++----------
>> 1 file changed, 25 insertions(+), 10 deletions(-)
>>
>> Index: xfs-cmds/xfstests/004
>> ===================================================================
>> --- xfs-cmds.orig/xfstests/004 2006-11-14 19:57:39.000000000 +1100
>> +++ xfs-cmds/xfstests/004 2007-05-04 16:38:03.957537306 +1000
>> @@ -67,21 +67,36 @@ xfs_db -r -c "freesp -s" $SCRATCH_DEV >$
>> echo "xfs_db for $SCRATCH_DEV" >>$seq.full
>> cat $tmp.xfs_db >>$seq.full
>>
>> +eval `$XFS_IO_PROG -x -c resblks $SCRATCH_MNT 2>&1 \
>> + | $AWK_PROG '/available/ { printf "resblks=%u\n", $5 }'`
>> +echo "resblks gave: resblks=$resblks" >>$seq.full
>> +
>> # check the 'blocks' field from freesp command is OK
>> # since 2.6.18, df does not report the 4 blocks per AG that cannot
>> # be allocated, hence we check for that exact mismatch.
>> +# since ~2.6.22, reserved blocks are used by default and df does
>> +# not report them, hence check for an exact mismatch.
>> perl -ne '
>> - BEGIN { $avail ='$avail' * 512;
>> - $answer="(no xfs_db free blocks line?)" }
>> - /free blocks (\d+)$/ || next;
>> - $freesp = $1 * '$dbsize';
>> - if ($freesp == $avail) { $answer = "yes"; }
>> - else {
>> + BEGIN { $avail ='$avail' * 512;
>> + $answer="(no xfs_db free blocks line?)" }
>> + /free blocks (\d+)$/ || next;
>> + $freesp = $1 * '$dbsize';
>> + if ($freesp == $avail) {
>> + $answer = "yes";
>> + } else {
>> $avail = $avail + (('$agcount' + 1) * '$dbsize' * 4);
>> - if ($freesp == $avail) { $answer = "yes"; }
>> - else { $answer = "no ($freesp != $avail)"; }
>> - }
>> - END { print "$answer\n" }
>> + if ($freesp == $avail) {
>> + $answer = "yes";
>> + } else {
>> + $avail = $avail + ('$resblks' * '$dbsize');
>> + if ($freesp == $avail) {
>> + $answer = "yes";
>> + } else {
>> + $answer = "no ($freesp != $avail)";
>> + }
>> + }
>> + }
>> + END { print "$answer\n" }
>> ' <$tmp.xfs_db >$tmp.ans
>> ans="`cat $tmp.ans`"
>> echo "Checking blocks column same as df: $ans"
>
next prev parent reply other threads:[~2007-06-15 7:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 6:33 Review: fix test 004 to account for reserved space David Chinner
2007-06-15 6:23 ` David Chinner
2007-06-15 7:33 ` Timothy Shimmin [this message]
2007-06-16 4:10 ` Tim Shimmin
2007-06-16 19:55 ` Christoph Hellwig
2007-06-18 23:54 ` David Chinner
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=467240C4.1090700@sgi.com \
--to=tes@sgi.com \
--cc=asg-qa@melbourne.sgi.com \
--cc=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.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