* [PATCH] xfstests: f2fs support @ 2014-06-02 13:59 jaegeuk 2014-06-03 11:32 ` Lukáš Czerner 0 siblings, 1 reply; 3+ messages in thread From: jaegeuk @ 2014-06-02 13:59 UTC (permalink / raw) To: Dave Chinner Cc: linux-fsdevel, Jaegeuk Kim, linux-kernel, linux-f2fs-devel, xfs From: Jaegeuk Kim <jaegeuk@kernel.org> This patch adds to support f2fs file system. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- common/config | 7 +++++++ common/rc | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/common/config b/common/config index 0dbf0b9..0607294 100644 --- a/common/config +++ b/common/config @@ -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" ;; diff --git a/common/rc b/common/rc index f27ee53..fcdabfe 100644 --- a/common/rc +++ b/common/rc @@ -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 ;; -- 1.8.5.2 (Apple Git-48) _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfstests: f2fs support 2014-06-02 13:59 [PATCH] xfstests: f2fs support jaegeuk @ 2014-06-03 11:32 ` Lukáš Czerner 2014-06-03 12:49 ` Lukáš Czerner 0 siblings, 1 reply; 3+ messages in thread From: Lukáš Czerner @ 2014-06-03 11:32 UTC (permalink / raw) To: Jaegeuk Kim; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, xfs On Mon, 2 Jun 2014, jaegeuk@kernel.org wrote: > Date: Mon, 2 Jun 2014 22:59:32 +0900 > From: jaegeuk@kernel.org > To: Dave Chinner <david@fromorbit.com> > Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org, > linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforget.net, > Jaegeuk Kim <jaegeuk@kernel.org> > Subject: [PATCH] xfstests: f2fs support > > From: Jaegeuk Kim <jaegeuk@kernel.org> > > This patch adds to support f2fs file system. Hi, Looks good. Signed-off-by: Lukas Czerner <lczerner@redhat.com> 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 > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> > --- > common/config | 7 +++++++ > common/rc | 6 ++++++ > 2 files changed, 13 insertions(+) > > diff --git a/common/config b/common/config > index 0dbf0b9..0607294 100644 > --- a/common/config > +++ b/common/config > @@ -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" > ;; > diff --git a/common/rc b/common/rc > index f27ee53..fcdabfe 100644 > --- a/common/rc > +++ b/common/rc > @@ -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 > ;; > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfstests: f2fs support 2014-06-03 11:32 ` Lukáš Czerner @ 2014-06-03 12:49 ` Lukáš Czerner 0 siblings, 0 replies; 3+ messages in thread From: Lukáš Czerner @ 2014-06-03 12:49 UTC (permalink / raw) To: Jaegeuk Kim; +Cc: linux-fsdevel, linux-kernel, linux-f2fs-devel, xfs [-- Attachment #1: Type: TEXT/PLAIN, Size: 4109 bytes --] On Tue, 3 Jun 2014, Lukáš Czerner wrote: > Date: Tue, 3 Jun 2014 13:32:30 +0200 (CEST) > From: Lukáš Czerner <lczerner@redhat.com> > To: Jaegeuk Kim <jaegeuk@kernel.org> > Cc: Dave Chinner <david@fromorbit.com>, xfs@oss.sgi.com, > linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, > linux-f2fs-devel@lists.sourceforget.net > Subject: Re: [PATCH] xfstests: f2fs support > > On Mon, 2 Jun 2014, jaegeuk@kernel.org wrote: > > > Date: Mon, 2 Jun 2014 22:59:32 +0900 > > From: jaegeuk@kernel.org > > To: Dave Chinner <david@fromorbit.com> > > Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org, > > linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforget.net, > > Jaegeuk Kim <jaegeuk@kernel.org> > > Subject: [PATCH] xfstests: f2fs support > > > > From: Jaegeuk Kim <jaegeuk@kernel.org> > > > > This patch adds to support f2fs file system. > > Hi, > > Looks good. > > Signed-off-by: Lukas Czerner <lczerner@redhat.com> > Oops, wrong macro. I meant to say Reviewed-by: Lukas Czerner <lczerner@redhat.com> > 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 > > > > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> > > --- > > common/config | 7 +++++++ > > common/rc | 6 ++++++ > > 2 files changed, 13 insertions(+) > > > > diff --git a/common/config b/common/config > > index 0dbf0b9..0607294 100644 > > --- a/common/config > > +++ b/common/config > > @@ -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" > > ;; > > diff --git a/common/rc b/common/rc > > index f27ee53..fcdabfe 100644 > > --- a/common/rc > > +++ b/common/rc > > @@ -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 > > ;; > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > [-- Attachment #2: Type: text/plain, Size: 121 bytes --] _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-06-03 12:49 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-06-02 13:59 [PATCH] xfstests: f2fs support jaegeuk 2014-06-03 11:32 ` Lukáš Czerner 2014-06-03 12:49 ` Lukáš Czerner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).