From: Christoph Hellwig <hch@lst.de>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH] xfs/004: relax freespace check
Date: Mon, 27 Feb 2017 16:52:35 -0800 [thread overview]
Message-ID: <20170228005235.9839-1-hch@lst.de> (raw)
Just check for a greater equals relation so that we don't have
to adjust the test for every new reservation scheme we add..
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
tests/xfs/004 | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tests/xfs/004 b/tests/xfs/004
index bbc1aee3..f27f4b79 100755
--- a/tests/xfs/004
+++ b/tests/xfs/004
@@ -83,18 +83,15 @@ eval `$XFS_IO_PROG -x -c resblks $SCRATCH_MNT 2>&1 \
echo "resblks gave: resblks=$resblks" >>$seqres.full
# check the 'blocks' field from freesp command is OK
-# - starting with Linux 4.10-rc the bmbt split reservation moved to be per-AG
perl -ne '
BEGIN { $avail ='$avail' * 512 + ('$resblks' * '$dbsize');
$answer="(no xfs_db free blocks line?)" }
/free blocks (\d+)$/ || next;
$freesp = $1 * '$dbsize';
- if ($freesp == $avail + ('$agcount') * '$dbsize' * 8) {
- $answer = "yes";
- } elsif ($freesp == $avail + (('$agcount' + 1) * '$dbsize' * 4)) {
+ if ($freesp >= $avail) {
$answer = "yes";
} else {
- $answer = "no ($freesp != $avail)";
+ $answer = "no ($freesp < $avail)";
}
END { print "$answer\n" }
' <$tmp.xfs_db >$tmp.ans
--
2.11.0
next reply other threads:[~2017-02-28 1:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 0:52 Christoph Hellwig [this message]
2017-02-28 5:35 ` [PATCH] xfs/004: relax freespace check Darrick J. Wong
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=20170228005235.9839-1-hch@lst.de \
--to=hch@lst.de \
--cc=fstests@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).