]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: f2fs support
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 24 Dec 2014 03:56:26 +0000 (14:56 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 24 Dec 2014 03:56:26 +0000 (14:56 +1100)
This patch adds to support f2fs file system.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/config
common/rc

index 085d390e3adcb9c6eb7d38233b626b4a441c18e9..235f4a12054d7626612dce516c503ccbe864b0d9 100644 (file)
@@ -219,6 +219,7 @@ case "$HOSTOS" in
         export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`"
         export MKFS_UDF_PROG="`set_prog_path mkudffs`"
         export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
+        export MKFS_F2FS_PROG="`set_prog_path mkfs.f2fs`"
         export BTRFS_UTIL_PROG="`set_prog_path btrfs`"
         export BTRFS_SHOW_SUPER_PROG="`set_prog_path btrfs-show-super`"
         export XFS_FSR_PROG="`set_prog_path xfs_fsr`"
@@ -255,6 +256,9 @@ _mount_opts()
                # acls & xattrs aren't turned on by default on ext$FOO
                export MOUNT_OPTIONS="-o acl,user_xattr $EXT_MOUNT_OPTIONS"
                ;;
+       f2fs)
+               export MOUNT_OPTIONS="-o acl,user_xattr $F2FS_MOUNT_OPTIONS"
+               ;;
        reiserfs)
                # acls & xattrs aren't turned on by default on reiserfs
                export MOUNT_OPTIONS="-o acl,user_xattr $REISERFS_MOUNT_OPTIONS"
@@ -330,6 +334,9 @@ _fsck_opts()
        reiser*)
                export FSCK_OPTIONS="--yes"
                ;;
+       f2fs)
+               export FSCK_OPTIONS=""
+               ;;
        *)
                export FSCK_OPTIONS="-n"
                ;;
index d0ade406c439a264b3c764450ddcdeb5695fb42f..5ce33229f2301255d620d828b8c7ef650c1a14fd 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -108,6 +108,9 @@ case "$FSTYP" in
     ext4)
         [ "$MKFS_EXT4_PROG" = "" ] && _fatal "mkfs.ext4 not found"
         ;;
+    f2fs)
+        [ "$MKFS_F2FS_PROG" = "" ] && _fatal "mkfs.f2fs not found"
+        ;;
     nfs)
         ;;
     cifs)
@@ -601,6 +604,9 @@ _scratch_mkfs()
     tmpfs)
        # do nothing for tmpfs
        ;;
+    f2fs)
+        $MKFS_F2FS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null
+       ;;
     *)
        yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV
        ;;