From: Jan Kara <jack@suse.cz>
To: xfs@oss.sgi.com
Cc: hch@infradead.org, Jan Kara <jack@suse.cz>
Subject: [PATCH 2/7] Fix test whether kernel supports quotas
Date: Wed, 19 May 2010 15:38:04 +0200 [thread overview]
Message-ID: <1274276289-8839-3-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1274276289-8839-1-git-send-email-jack@suse.cz>
For all 2.6 kernels presence of quota support in kernel can be detected by
checking /proc/sys/fs/quota. This is actually more reliable than trying to
mount a filesystem with quota options (for example because SCRATCH_DEV does
not have to contain a filesystem type we are going to test).
Signed-off-by: Jan Kara <jack@suse.cz>
---
common.quota | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/common.quota b/common.quota
index 51bdc71..033390f 100644
--- a/common.quota
+++ b/common.quota
@@ -27,10 +27,7 @@
_require_quota()
{
[ -x /usr/bin/quota ] || _notrun "Quota user tools not installed"
- _scratch_mount "-o usrquota,grpquota"
- ret=$?
- umount $SCRATCH_MNT
- [ $ret -ne 0 ] && _notrun "Installed kernel does not support quota"
+ [ -d /proc/sys/fs/quota ] || _notrun "Installed kernel does not support quota"
}
#
--
1.6.4.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-05-19 13:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 13:38 [PATCH 0/7 V2] Quota tests for XFSQA Jan Kara
2010-05-19 13:38 ` [PATCH 1/7] xfstests: test extent size hints Jan Kara
2010-05-20 15:01 ` Christoph Hellwig
2010-05-20 17:14 ` Jan Kara
2010-05-19 13:38 ` Jan Kara [this message]
2010-05-19 18:42 ` [PATCH 2/7] Fix test whether kernel supports quotas Christoph Hellwig
2010-05-20 12:49 ` Jan Kara
2010-05-20 15:05 ` Christoph Hellwig
2010-05-20 16:53 ` Jan Kara
2010-05-19 13:38 ` [PATCH 3/7] Test basic quota enforcement Jan Kara
2010-05-20 15:11 ` Christoph Hellwig
2010-05-20 17:21 ` Jan Kara
2010-05-19 13:38 ` [PATCH 4/7] Add test of quota accounting using fsx Jan Kara
2010-05-19 22:28 ` Dave Chinner
2010-05-20 12:52 ` Jan Kara
2010-05-19 13:38 ` [PATCH 5/7] Add quota test with fsstress Jan Kara
2010-05-20 13:16 ` Dave Chinner
2010-05-20 13:22 ` Jan Kara
2010-05-19 13:38 ` [PATCH 6/7] Add quota accounting test when fsstress is run and quota limits are set low Jan Kara
2010-05-19 13:38 ` [PATCH 7/7] Add test of quota limit and info setting Jan Kara
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=1274276289-8839-3-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=hch@infradead.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