xfs
[Top] [All Lists]

[PATCH 2/7] Fix test whether kernel supports quotas

To: xfs@xxxxxxxxxxx
Subject: [PATCH 2/7] Fix test whether kernel supports quotas
From: Jan Kara <jack@xxxxxxx>
Date: Wed, 19 May 2010 15:38:04 +0200
Cc: david@xxxxxxxxxxxxx, hch@xxxxxxxxxxxxx, Jan Kara <jack@xxxxxxx>
In-reply-to: <1274276289-8839-1-git-send-email-jack@xxxxxxx>
References: <1274276289-8839-1-git-send-email-jack@xxxxxxx>
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@xxxxxxx>
---
 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

<Prev in Thread] Current Thread [Next in Thread>