From: Dave Chinner <david@fromorbit.com>
To: xfs@oss.sgi.com
Subject: [PATCH 3/4] xfstests: _check_quota_usage needs to unmount to get XFS quotacheck
Date: Thu, 26 Jul 2012 18:35:05 +1000 [thread overview]
Message-ID: <1343291706-14882-4-git-send-email-david@fromorbit.com> (raw)
In-Reply-To: <1343291706-14882-1-git-send-email-david@fromorbit.com>
From: Dave Chinner <dchinner@redhat.com>
Remount won't run a quota check - it's only done during mount. Hence
all quota tests using this check function are not actually
validating XFS filesystems right now.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
common.quota | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/common.quota b/common.quota
index 9736306..2fa784b 100644
--- a/common.quota
+++ b/common.quota
@@ -236,6 +236,11 @@ _check_quota_usage()
{
# Sync to get delalloc to disk
sync
+
+ # kill caches to guarantee removal speculative delalloc
+ # XXX: really need an ioctl instead of this big hammer
+ echo 3 > /proc/sys/vm/drop_caches
+
VFS_QUOTA=0
case $FSTYP in
ext2|ext3|ext4|ext4dev|reiserfs)
@@ -253,8 +258,9 @@ _check_quota_usage()
quotacheck -u -g $SCRATCH_MNT 2>/dev/null
else
# use XFS method to force quotacheck
- mount -o remount,noquota $SCRATCH_DEV
- mount -o remount,usrquota,grpquota $SCRATCH_DEV
+ xfs_quota -x -c "off -ug" $SCRATCH_MNT
+ _scratch_unmount
+ _scratch_mount "-o usrquota,grpquota"
fi
repquota -u -n $SCRATCH_MNT | grep -v "^#0" | _filter_scratch |
sort >$tmp.user.checked
--
1.7.10
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-07-26 8:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 8:35 [PATCH 0/4] xfstests: random fixes and improvements Dave Chinner
2012-07-26 8:35 ` [PATCH 1/4] xfstests: test 110 sometimes fails to unmount scratch dev Dave Chinner
2012-08-16 19:16 ` Rich Johnston
2012-08-28 20:06 ` Christoph Hellwig
2012-08-28 20:20 ` Ben Myers
2012-07-26 8:35 ` [PATCH 2/4] xfstests: loop devices vs umount stupidity Dave Chinner
2012-08-16 19:16 ` Rich Johnston
2012-08-16 22:27 ` Dave Chinner
2012-08-17 12:45 ` Rich Johnston
2012-08-28 20:06 ` Christoph Hellwig
2012-07-26 8:35 ` Dave Chinner [this message]
2012-07-26 22:55 ` [PATCH 3/4] xfstests: _check_quota_usage needs to unmount to get XFS quotacheck Dave Chinner
2012-08-16 19:16 ` Rich Johnston
2012-08-28 20:07 ` Christoph Hellwig
2012-07-26 8:35 ` [PATCH 4/4] xfstests: speed up 227 by using preallocation Dave Chinner
2012-08-16 19:16 ` Rich Johnston
2012-08-28 20:07 ` Christoph Hellwig
2012-08-14 21:39 ` [PATCH 0/4] xfstests: random fixes and improvements Dave 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=1343291706-14882-4-git-send-email-david@fromorbit.com \
--to=david@fromorbit.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 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.