X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,J_CHICKENPOX_65 autolearn=no version=3.4.0-r929098 Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id o4JDa6Jv131886 for ; Wed, 19 May 2010 08:36:06 -0500 X-ASG-Debug-ID: 1274276304-0475027b0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx1.suse.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 458221DF3500 for ; Wed, 19 May 2010 06:38:24 -0700 (PDT) Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by cuda.sgi.com with ESMTP id RBLivk6etzTFGTAZ for ; Wed, 19 May 2010 06:38:24 -0700 (PDT) X-ASG-Whitelist: Barracuda Reputation Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6813194430; Wed, 19 May 2010 15:38:24 +0200 (CEST) Received: by quack.suse.cz (Postfix, from userid 10005) id 8C57C2B1B30; Wed, 19 May 2010 15:38:13 +0200 (CEST) From: Jan Kara To: xfs@oss.sgi.com Cc: david@fromorbit.com, hch@infradead.org, Jan Kara X-ASG-Orig-Subj: [PATCH 2/7] Fix test whether kernel supports quotas Subject: [PATCH 2/7] Fix test whether kernel supports quotas Date: Wed, 19 May 2010 15:38:04 +0200 Message-Id: <1274276289-8839-3-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.6.4.2 In-Reply-To: <1274276289-8839-1-git-send-email-jack@suse.cz> References: <1274276289-8839-1-git-send-email-jack@suse.cz> X-Barracuda-Connect: cantor.suse.de[195.135.220.2] X-Barracuda-Start-Time: 1274276305 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean 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 --- 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