From: Brian Foster <bfoster@redhat.com>
To: fstests@vger.kernel.org
Cc: xfs@oss.sgi.com
Subject: [PATCH] xfs/007: use gquotino for project quotas on pre-v5 superblocks
Date: Mon, 18 May 2015 11:38:29 -0400 [thread overview]
Message-ID: <1431963509-54017-1-git-send-email-bfoster@redhat.com> (raw)
This test checks block usage on quota inodes based on the inode number
values stored in the superblock. Version 5 superblocks (crc=1) have an
independent project quota inode field to support concurrent group and
project quotas. Older superblocks do not have the pquotino field. The
gquotino field is reused for project quotas.
The test currently unconditionally uses the pquotino field to determine
the project quota inode. This causes failures on pre-v5 superblocks as
the test queries the block usage of an incorrect inode number. Update
the test to use gquotino as the project quota inode on such filesystems.
Signed-off-by: Brian Foster <bfoster@redhat.com>
---
tests/xfs/007 | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/xfs/007 b/tests/xfs/007
index 01cc421..76c100f 100755
--- a/tests/xfs/007
+++ b/tests/xfs/007
@@ -50,7 +50,8 @@ _require_xfs_quota
rm -f $seqres.full
-_scratch_mkfs_xfs >/dev/null 2>&1
+_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
+. $tmp.mkfs
do_test()
{
@@ -88,11 +89,16 @@ _qmount_option "uquota,gquota"
_qmount
do_test uquotino gquotino ug
-# Test user and project
+# Test user and project. Note that pquotino only exists on v5 (crc=1)
+# superblocks. Older supers reuse gquotino.
+PQUOTINO=pquotino
+if [ $_fs_has_crcs == 0 ]; then
+ PQUOTINO=gquotino
+fi
_qmount_option "uquota,pquota"
_qmount
_require_prjquota $SCRATCH_DEV
-do_test uquotino pquotino up
+do_test uquotino $PQUOTINO up
# success, all done
status=0
--
1.9.3
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
reply other threads:[~2015-05-18 15:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1431963509-54017-1-git-send-email-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=fstests@vger.kernel.org \
--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