On 2018/1/10 16:24, Chen Rong wrote:
> f2fs-tools has a defragment tool, so we can test generic/324 on f2fs

+Cc f2fs mailing list

defrag.f2fs can only do filesystem-level defragment, but it looks like
generic/324 expects to execute file-level defragment, so we can not simply
use that existing tool in this testcase.

As I checked, actually, this modification does let this testcase passed, so
isn't there any problem in verification flow of this testcase?

Thanks,

> 
> Signed-off-by: Chen Rong <rongx.a.c...@intel.com>
> ---
>  common/config | 1 +
>  common/defrag | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/common/config b/common/config
> index d0fbfe5..71cb367 100644
> --- a/common/config
> +++ b/common/config
> @@ -226,6 +226,7 @@ case "$HOSTOS" in
>          export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`"
>          export MKFS_F2FS_PROG="`set_prog_path mkfs.f2fs`"
>          export DUMP_F2FS_PROG="`set_prog_path dump.f2fs`"
> +        export DEFRAG_F2FS_PROG="`set_prog_path defrag.f2fs`"
>          export BTRFS_UTIL_PROG="`set_prog_path btrfs`"
>          export BTRFS_SHOW_SUPER_PROG="`set_prog_path btrfs-show-super`"
>       export BTRFS_CONVERT_PROG="`set_prog_path btrfs-convert`"
> diff --git a/common/defrag b/common/defrag
> index d279382..d54b89c 100644
> --- a/common/defrag
> +++ b/common/defrag
> @@ -44,6 +44,9 @@ _require_defrag()
>      btrfs)
>       DEFRAG_PROG="$BTRFS_UTIL_PROG filesystem defragment"
>       ;;
> +    f2fs)
> +     DEFRAG_PROG="$DEFRAG_F2FS_PROG"
> +     ;;
>      *)
>          _notrun "defragmentation not supported for fstype \"$FSTYP\""
>       ;;
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to