]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
Reiser4 initial implementation
authorDushan Tcholich <dusanc@gmail.com>
Wed, 24 Dec 2014 03:56:07 +0000 (14:56 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 24 Dec 2014 03:56:07 +0000 (14:56 +1100)
Initial xfstests implementation for Reiser4 filesystem.

Signed-off-by: Dushan Tcholich <dusanc@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/config
common/rc

index e9971fdf425bf8ad7136d57d14e1d57edbf40121..085d390e3adcb9c6eb7d38233b626b4a441c18e9 100644 (file)
@@ -224,6 +224,7 @@ case "$HOSTOS" in
         export XFS_FSR_PROG="`set_prog_path xfs_fsr`"
         export MKFS_NFS_PROG="false"
         export MKFS_CIFS_PROG="false"
+        export MKFS_REISER4_PROG="`set_prog_path mkfs.reiser4`"
         ;;
 esac
 
@@ -258,6 +259,10 @@ _mount_opts()
                # acls & xattrs aren't turned on by default on reiserfs
                export MOUNT_OPTIONS="-o acl,user_xattr $REISERFS_MOUNT_OPTIONS"
                ;;
+       reiser4)
+               # acls & xattrs aren't supported by reiser4
+               export MOUNT_OPTIONS=$REISER4_MOUNT_OPTIONS
+               ;;
        gfs2)
                # acls aren't turned on by default on gfs2
                export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
@@ -302,6 +307,9 @@ _mkfs_opts()
        reiserfs)
                export MKFS_OPTIONS="$REISERFS_MKFS_OPTIONS -q"
                ;;
+       reiser4)
+               export MKFS_OPTIONS=$REISER4_MKFS_OPTIONS
+               ;;
        gfs2)
                export MKFS_OPTIONS="$GFS2_MKFS_OPTIONS -O -p lock_nolock"
                ;;
@@ -319,7 +327,7 @@ _fsck_opts()
        ext2|ext3|ext4|ext4dev)
                export FSCK_OPTIONS="-nf"
                ;;
-       reiserfs)
+       reiser*)
                export FSCK_OPTIONS="--yes"
                ;;
        *)
index f475818558456ce793daee4e129088b27654e86d..d0ade406c439a264b3c764450ddcdeb5695fb42f 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -112,6 +112,9 @@ case "$FSTYP" in
         ;;
     cifs)
         ;;
+    reiser4)
+        [ "$MKFS_REISER4_PROG" = "" ] && _fatal "mkfs.reiser4 not found"
+        ;;
 esac
 
 # make sure we have a standard umask
@@ -633,7 +636,7 @@ _scratch_mkfs_sized()
     xfs)
        def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'`
        ;;
-    ext2|ext3|ext4|ext4dev|udf|btrfs)
+    ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4)
        def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
        ;;
     esac
@@ -676,6 +679,11 @@ _scratch_mkfs_sized()
     btrfs)
        $MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
        ;;
+    reiser4)
+       # mkfs.resier4 requires size in KB as input for creating filesystem
+       $MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \
+                          `expr $fssize / 1024`
+       ;;
     *)
        _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
        ;;