xfstests: f2fs support
PATCH 1/1 xfstests: f2fs support
From: Jaegeuk Kim <[email protected]>
This patch adds to support f2fs file system.
--- common/config | 7 +++++++ common/rc | 6 ++++++ 2 files changed, 13 insertions(+)
common/config +7 -0
@@ -210,6 +210,7 @@ case "$HOSTOS" in export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`" 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`"
@@ -241,6 +242,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"
@@ -295,6 +299,9 @@ _fsck_opts() reiserfs) export FSCK_OPTIONS="--yes" ;; + f2fs) + export FSCK_OPTIONS="" + ;; *) export FSCK_OPTIONS="-n" ;;
common/rc +6 -0
@@ -105,6 +105,9 @@ case "$FSTYP" in btrfs) [ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found" ;; + f2fs) + [ "$MKFS_F2FS_PROG" = "" ] && _fatal "mkfs.f2fs not found" + ;; nfs) ;; esac
@@ -511,6 +514,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 ;;
Signature · 6 lines
1.8.5.2 (Apple Git-48) _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 11 lines · On Mon, 2 Jun 2014, [email protected] wrote:
Date: Mon, 2 Jun 2014 22:59:32 +0900
From: [email protected]
To: Dave Chinner <[email protected]>
Cc: [email protected], [email protected],
[email protected], [email protected], Jaegeuk Kim <[email protected]>
Subject: [PATCH] xfstests: f2fs supportFrom: Jaegeuk Kim <[email protected]>
This patch adds to support f2fs file system.
Hi,
Looks good.
Btw dry run option in fsck is quite useful here because when the file system gets corrupted you do not want it to get fixed, but rather investigate the corrupted file system to figure out what happened. But of course it's not required :)
However after a quick look at you fsck code it seems that you do not attempt to fix anything at all...
Also having mkfs to check for existing signatures on the device before attempting to create the file system is a good thing to do (at least xfs, btrfs extN are doing so) to avoid data loss by mistake. You can use libblkid from util-linux and it's very simple to use.
Thanks!
-Lukas
Quoted 55 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- common/config | 7 +++++++ common/rc | 6 ++++++ 2 files changed, 13 insertions(+)common/config +7
-0@@ -210,6 +210,7 @@ case "$HOSTOS" in export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`" 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`"@@ -241,6 +242,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"@@ -295,6 +299,9 @@ _fsck_opts() reiserfs) export FSCK_OPTIONS="--yes" ;; + f2fs) + export FSCK_OPTIONS="" + ;; *) export FSCK_OPTIONS="-n" ;;common/rc +3
-0@@ -105,6 +105,9 @@ case "$FSTYP" in btrfs) [ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found" ;; + f2fs) + [ "$MKFS_F2FS_PROG" = "" ] && _fatal "mkfs.f2fs not found" + ;; nfs) ;; esac
common/rc _scratch_mkfs() · line 522
Quoted 9 lines
common/rc +3
-0@@ -511,6 +514,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 ;;
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Lukáš Czerner
Reviewed-byQuoted 20 lines · Lukáš Czerner
Date: Tue, 3 Jun 2014 13:32:30 +0200 (CEST)
From: Lukáš Czerner <[email protected]>
To: Jaegeuk Kim <[email protected]>
Cc: Dave Chinner <[email protected]>, [email protected],
[email protected], [email protected], [email protected]
Subject: Re: [PATCH] xfstests: f2fs supportQuoted 10 lines · On Mon, 2 Jun 2014, [email protected] wrote:
Date: Mon, 2 Jun 2014 22:59:32 +0900
From: [email protected]
To: Dave Chinner <[email protected]>
Cc: [email protected], [email protected],
[email protected], [email protected], Jaegeuk Kim <[email protected]>
Subject: [PATCH] xfstests: f2fs supportFrom: Jaegeuk Kim <[email protected]>
Quoted 8 lines
Quoted 1 line
This patch adds to support f2fs file system.
Hi,
Looks good.
Signed-off-by Lukas Czerner <[email protected]>
Oops, wrong macro. I meant to say
Quoted 77 lines
Btw dry run option in fsck is quite useful here because when the file system gets corrupted you do not want it to get fixed, but rather investigate the corrupted file system to figure out what happened. But of course it's not required :)
However after a quick look at you fsck code it seems that you do not attempt to fix anything at all...
Also having mkfs to check for existing signatures on the device before attempting to create the file system is a good thing to do (at least xfs, btrfs extN are doing so) to avoid data loss by mistake. You can use libblkid from util-linux and it's very simple to use.
Thanks!
-LukasQuoted 60 lines
Signed-off-by Jaegeuk Kim <[email protected]>--- common/config | 7 +++++++ common/rc | 6 ++++++ 2 files changed, 13 insertions(+)common/config +7
-0@@ -210,6 +210,7 @@ case "$HOSTOS" in export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`" 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`"@@ -241,6 +242,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"@@ -295,6 +299,9 @@ _fsck_opts() reiserfs) export FSCK_OPTIONS="--yes" ;; + f2fs) + export FSCK_OPTIONS="" + ;; *) export FSCK_OPTIONS="-n" ;;common/rc +6
-0@@ -105,6 +105,9 @@ case "$FSTYP" in btrfs) [ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found" ;; + f2fs) + [ "$MKFS_F2FS_PROG" = "" ] && _fatal "mkfs.f2fs not found" + ;; nfs) ;; esac@@ -511,6 +514,9 @@ _scratch_mkfs() tmpfs) # do nothing for tmpfs ;; + f2fs) + $MKFS_F2FS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV > /dev/null + ;;
Quoted 9 lines
common/rc _scratch_mkfs() · line 522
Quoted 4 lines
common/rc +0
-0*) yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $SCRATCH_DEV ;;--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
(redirecting to the new fstests list)
Dave, this got a review from Lukas, and seems fine. Can you pull it in?
Thanks,
-Eric
Quoted 67 lines · On 6/2/14 8:59 AM, [email protected] wrote:
From: Jaegeuk Kim <[email protected]>
This patch adds to support f2fs file system.
Signed-off-by Jaegeuk Kim <[email protected]>--- common/config | 7 +++++++ common/rc | 6 ++++++ 2 files changed, 13 insertions(+)common/config +7
-0@@ -210,6 +210,7 @@ case "$HOSTOS" in export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`" 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`"@@ -241,6 +242,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"@@ -295,6 +299,9 @@ _fsck_opts() reiserfs) export FSCK_OPTIONS="--yes" ;; + f2fs) + export FSCK_OPTIONS="" + ;; *) export FSCK_OPTIONS="-n" ;;common/rc +6
-0@@ -105,6 +105,9 @@ case "$FSTYP" in btrfs) [ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found" ;; + f2fs) + [ "$MKFS_F2FS_PROG" = "" ] && _fatal "mkfs.f2fs not found" + ;; nfs) ;; esac@@ -511,6 +514,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 ;;
Quoted 4 lines · Eric Sandeen
(redirecting to the new fstests list)
Dave, this got a review from Lukas, and seems fine. Can you pull it in?
Can it be reposted so I can pull it in directly? quoted patches aren't recognised by any tool...
Cheers,
Dave.
Quoted 74 lines
Thanks,
-EricQuoted 67 lines · On 6/2/14 8:59 AM, [email protected] wrote:
From: Jaegeuk Kim <[email protected]>
This patch adds to support f2fs file system.
Signed-off-by Jaegeuk Kim <[email protected]>--- common/config | 7 +++++++ common/rc | 6 ++++++ 2 files changed, 13 insertions(+)common/config +7
-0@@ -210,6 +210,7 @@ case "$HOSTOS" in export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`" 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`"@@ -241,6 +242,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"@@ -295,6 +299,9 @@ _fsck_opts() reiserfs) export FSCK_OPTIONS="--yes" ;; + f2fs) + export FSCK_OPTIONS="" + ;; *) export FSCK_OPTIONS="-n" ;;common/rc +6
-0@@ -105,6 +105,9 @@ case "$FSTYP" in btrfs) [ "$MKFS_BTRFS_PROG" = "" ] && _fatal "mkfs.btrfs not found" ;; + f2fs) + [ "$MKFS_F2FS_PROG" = "" ] && _fatal "mkfs.f2fs not found" + ;; nfs) ;; esac@@ -511,6 +514,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 ;;
Signature · 2 lines
Dave Chinner [email protected]
Jaegeuk Kim
Reviewed-by Lukas CzernerThanks Eric,
I totally forgot this patch to repost.
Dave,
Could you please apply this patch?
Thanks,
-- >8 --
Quoted 1 line
From
86eb93921e1ce28e965e3152ac7066b45bccb4ebMon Sep 17 00:00:00 2001
From: Jaegeuk Kim <[email protected]>
Date: Mon, 2 Jun 2014 20:09:19 +0900
Subject: [PATCH] xfstests: f2fs support
This patch adds to support f2fs file system.
--- common/config | 7 +++++++ common/rc | 6 ++++++ 2 files changed, 13 insertions(+)
common/config +7 -0
@@ -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`"
@@ -254,6 +255,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"
@@ -322,6 +326,9 @@ _fsck_opts() reiserfs) export FSCK_OPTIONS="--yes" ;; + f2fs) + export FSCK_OPTIONS="" + ;; *) export FSCK_OPTIONS="-n" ;;
common/rc +6 -0
@@ -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)
@@ -598,6 +601,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 ;;
Signature · 1 line
2.1.1