ext4: skip project quota tests if the kernel does not support them
authorTheodore Ts'o <tytso@mit.edu>
Sun, 8 Oct 2017 19:27:46 +0000 (15:27 -0400)
committerEryu Guan <eguan@redhat.com>
Mon, 9 Oct 2017 09:52:22 +0000 (17:52 +0800)
In _scratch_enable_pquota, use _notrun if the file system with project
quotas enable can't be mounted, since that indicates the kernel
doesn't support that feature.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/quota

index f49728c24f7105995c8af2c10e287b9af96098fd..d027a8c117e0df11976d1a09a8e9d9b76e0da1c1 100644 (file)
@@ -119,6 +119,9 @@ _scratch_enable_pquota()
        [ "$FSTYP" != "ext4" ] && return
 
        tune2fs -O quota,project $SCRATCH_DEV >>$seqres.full 2>&1
+       _scratch_mount >/dev/null 2>&1 \
+               || _notrun "kernel doesn't support project feature on $FSTYP"
+       _scratch_unmount
 }
 
 #