xfstests: add support for ext4dev FSTYP
authorAmir Goldstein <amir73il@users.sf.net>
Fri, 3 Jun 2011 03:35:18 +0000 (22:35 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 3 Jun 2011 03:35:18 +0000 (22:35 -0500)
blkid knows to identify the ext4dev FSTYP of a partition that was
formatted with mkfs.ext4dev.
quota tools and various util-linux utils are also aware of ext4dev,
so ext4dev shares the same capabilities as ext4.

Tested-by: Sergey Ivanov <sergey57@gmail.com>
Signed-off-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
common.defrag
common.quota
common.rc

index 1bcf01d5b331acb057a82550e25f49948b7e94ed..4850803d1b7cafebcd5a454c62b759b916057ccd 100644 (file)
@@ -26,7 +26,7 @@ _require_defrag()
     xfs)
         DEFRAG_PROG=/usr/sbin/xfs_fsr
        ;;
-    ext4)
+    ext4|ext4dev)
         DEFRAG_PROG=/usr/bin/e4defrag
        ;;
     *)
index 3c87ce14e60ca9174eb4420333c27b2e211f994c..97363063299b2f83873ac311a717ce5854ef3f6b 100644 (file)
@@ -29,7 +29,7 @@ _require_quota()
     [ -n $QUOTA_PROG ] || _notrun "Quota user tools not installed"
 
     case $FSTYP in
-    ext2|ext3|ext4|reiserfs)
+    ext2|ext3|ext4|ext4dev|reiserfs)
        if [ ! -d /proc/sys/fs/quota ]; then
            _notrun "Installed kernel does not support quotas"
        fi
@@ -237,10 +237,14 @@ _check_quota_usage()
        # Sync to get delalloc to disk
        sync
        VFS_QUOTA=0
-       if [ $FSTYP = "ext2" -o $FSTYP = "ext3" -o $FSTYP = "ext4" -o $FSTYP = "reiserfs" ]; then
+       case $FSTYP in
+       ext2|ext3|ext4|ext4dev|reiserfs)
                VFS_QUOTA=1
                quotaon -f -u -g $SCRATCH_MNT 2>/dev/null
-       fi
+               ;;
+       *)
+               ;;
+       esac
        repquota -u -n $SCRATCH_MNT  | grep -v "^#0" | _filter_scratch |
                sort >$tmp.user.orig
        repquota -g -n $SCRATCH_MNT  | grep -v "^#0" | _filter_scratch |
index e634fbb359392808ffb25888504742b3a1f46655..c510c66e8a2f0c6575226801dc9770438f09e47a 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -65,7 +65,7 @@ _mount_opts()
     nfs)
        export MOUNT_OPTIONS=$NFS_MOUNT_OPTIONS
        ;;
-    ext2|ext3|ext4)
+    ext2|ext3|ext4|ext4dev)
        # acls & xattrs aren't turned on by default on ext$FOO
        export MOUNT_OPTIONS="-o acl,user_xattr $EXT_MOUNT_OPTIONS"
        ;;
@@ -110,7 +110,7 @@ _mkfs_opts()
 _fsck_opts()
 {
     case $FSTYP in
-    ext2|ext3|ext4)
+    ext2|ext3|ext4|ext4dev)
        export FSCK_OPTIONS="-nf"
        ;;
     reiserfs)
@@ -326,10 +326,10 @@ _scratch_mkfs_sized()
     xfs)
        _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
        ;;
-    ext2|ext3|ext4)
+    ext2|ext3|ext4|ext4dev)
        /sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
        ;;
-     btrfs)
+    btrfs)
        /sbin/mkfs.$FSTYP $MKFS_OPTIONS $SCRATCH_DEV -b $fssize
        ;;
     *)
@@ -354,7 +354,7 @@ _scratch_mkfs_geom()
     xfs)
        MKFS_OPTIONS+=" -b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
        ;;
-    ext4)
+    ext4|ext4dev)
        MKFS_OPTIONS+=" -b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks"
        ;;
     *)