From f1436346b45d7ecb9d4d0be0fd4c1b456a2bf357 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 21 Oct 2010 05:55:58 +0200 Subject: [PATCH] xfstests: fix quota detection Even if the kernel has quota support built in most filesystems still don't support it. As there's no good way to find out if a filesystem supports quotas hardcode the list of filesystems that do support quotas. Signed-off-by: Christoph Hellwig Reviewed-by: Alex Elder --- common.quota | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/common.quota b/common.quota index 1520df1f..acf18a84 100644 --- a/common.quota +++ b/common.quota @@ -27,11 +27,24 @@ _require_quota() { [ -n $QUOTA_PROG ] || _notrun "Quota user tools not installed" - if [ $FSTYP = "xfs" ]; then - [ -f /proc/fs/xfs/xqmstat ] || _notrun "Installed kernel does not support XFS quota" - elif [ $FSTYP != "gfs2" ]; then - [ -d /proc/sys/fs/quota ] || _notrun "Installed kernel does not support quota" - fi + + case $FSTYP in + ext2|ext3|ext4|reiserfs) + if [ ! -d /proc/sys/fs/quota ]; then + _notrun "Installed kernel does not support quotas" + fi + ;; + gfs2) + ;; + xfs) + if [ ! -f /proc/fs/xfs/xqmstat ]; then + _notrun "Installed kernel does not support XFS quotas" + fi + ;; + *) + _notrun "disk quotas not supported by this filesystem type: $FSTYP" + ;; + esac } # -- 2.39.5