All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Zheng Liu <gnehzuil.liu@gmail.com>
Cc: xfs@oss.sgi.com, linux-ext4@vger.kernel.org,
	Zheng Liu <wenqing.lz@taobao.com>,
	Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH v2] xfstests: use right defrag program path
Date: Fri, 01 Mar 2013 09:48:17 -0600	[thread overview]
Message-ID: <5130CDC1.8060704@redhat.com> (raw)
In-Reply-To: <1362147433-5788-1-git-send-email-wenqing.lz@taobao.com>

On 3/1/13 8:17 AM, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
> 
> In _require_defrag defragmentation command path is fixed.  That will
> cause that this test case is skipped in some distributions.
> 
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> Cc: Dave Chinner <david@fromorbit.com>
> ---
> [*NOTE*: this patch is Cc'ed to linux-ext4 mailing list because after
> applied it xfstests #218 will fail against 3.8 and dev branch.]
> 
> v2 <- v1:
>  * Define 'E4DEFRAG_PROG' and 'FILEFRAG_PROG' in common.config with
>    set_prog_path

Looks good to me, thanks.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

>  common.config |  2 ++
>  common.defrag | 10 +++++-----
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/common.config b/common.config
> index 7174127..9c99bfe 100644
> --- a/common.config
> +++ b/common.config
> @@ -160,6 +160,8 @@ export INDENT_PROG="`set_prog_path indent`"
>  export XFS_COPY_PROG="`set_prog_path xfs_copy`"
>  export FSTRIM_PROG="`set_prog_path fstrim`"
>  export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
> +export FILEFRAG_PROG="`set_prog_path filefrag`"
> +export E4DEFRAG_PROG="`set_prog_path e4defrag`"
>  
>  # Generate a comparable xfsprogs version number in the form of
>  # major * 10000 + minor * 100 + release
> diff --git a/common.defrag b/common.defrag
> index ea6c14c..9c9eb9b 100644
> --- a/common.defrag
> +++ b/common.defrag
> @@ -24,10 +24,10 @@ _require_defrag()
>  {
>      case "$FSTYP" in
>      xfs)
> -        DEFRAG_PROG=/usr/sbin/xfs_fsr
> +        DEFRAG_PROG="$XFS_FSR_PROG"
>  	;;
>      ext4|ext4dev)
> -        DEFRAG_PROG=/usr/bin/e4defrag
> +        DEFRAG_PROG="$E4DEFRAG_PROG"
>  	;;
>      btrfs)
>  	DEFRAG_PROG="$BTRFS_UTIL_PROG filesystem defragment"
> @@ -38,13 +38,13 @@ _require_defrag()
>      esac
>  
>      _require_command $DEFRAG_PROG
> -    _require_command /usr/sbin/filefrag
> +    _require_command $FILEFRAG_PROG
>  }
>  
>  _extent_count()
>  {
> -	filefrag $1 | awk '{print $2}'
> -	filefrag -v $1  >> $seq.full 2>&1
> +	$FILEFRAG_PROG $1 | awk '{print $2}'
> +	$FILEFRAG_PROG -v $1  >> $seq.full 2>&1
>  }
>  
>  # Defrag file, check it, and remove it.
> 


WARNING: multiple messages have this Message-ID (diff)
From: Eric Sandeen <sandeen@redhat.com>
To: Zheng Liu <gnehzuil.liu@gmail.com>
Cc: linux-ext4@vger.kernel.org, Zheng Liu <wenqing.lz@taobao.com>,
	xfs@oss.sgi.com
Subject: Re: [PATCH v2] xfstests: use right defrag program path
Date: Fri, 01 Mar 2013 09:48:17 -0600	[thread overview]
Message-ID: <5130CDC1.8060704@redhat.com> (raw)
In-Reply-To: <1362147433-5788-1-git-send-email-wenqing.lz@taobao.com>

On 3/1/13 8:17 AM, Zheng Liu wrote:
> From: Zheng Liu <wenqing.lz@taobao.com>
> 
> In _require_defrag defragmentation command path is fixed.  That will
> cause that this test case is skipped in some distributions.
> 
> Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
> Cc: Dave Chinner <david@fromorbit.com>
> ---
> [*NOTE*: this patch is Cc'ed to linux-ext4 mailing list because after
> applied it xfstests #218 will fail against 3.8 and dev branch.]
> 
> v2 <- v1:
>  * Define 'E4DEFRAG_PROG' and 'FILEFRAG_PROG' in common.config with
>    set_prog_path

Looks good to me, thanks.

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

>  common.config |  2 ++
>  common.defrag | 10 +++++-----
>  2 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/common.config b/common.config
> index 7174127..9c99bfe 100644
> --- a/common.config
> +++ b/common.config
> @@ -160,6 +160,8 @@ export INDENT_PROG="`set_prog_path indent`"
>  export XFS_COPY_PROG="`set_prog_path xfs_copy`"
>  export FSTRIM_PROG="`set_prog_path fstrim`"
>  export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
> +export FILEFRAG_PROG="`set_prog_path filefrag`"
> +export E4DEFRAG_PROG="`set_prog_path e4defrag`"
>  
>  # Generate a comparable xfsprogs version number in the form of
>  # major * 10000 + minor * 100 + release
> diff --git a/common.defrag b/common.defrag
> index ea6c14c..9c9eb9b 100644
> --- a/common.defrag
> +++ b/common.defrag
> @@ -24,10 +24,10 @@ _require_defrag()
>  {
>      case "$FSTYP" in
>      xfs)
> -        DEFRAG_PROG=/usr/sbin/xfs_fsr
> +        DEFRAG_PROG="$XFS_FSR_PROG"
>  	;;
>      ext4|ext4dev)
> -        DEFRAG_PROG=/usr/bin/e4defrag
> +        DEFRAG_PROG="$E4DEFRAG_PROG"
>  	;;
>      btrfs)
>  	DEFRAG_PROG="$BTRFS_UTIL_PROG filesystem defragment"
> @@ -38,13 +38,13 @@ _require_defrag()
>      esac
>  
>      _require_command $DEFRAG_PROG
> -    _require_command /usr/sbin/filefrag
> +    _require_command $FILEFRAG_PROG
>  }
>  
>  _extent_count()
>  {
> -	filefrag $1 | awk '{print $2}'
> -	filefrag -v $1  >> $seq.full 2>&1
> +	$FILEFRAG_PROG $1 | awk '{print $2}'
> +	$FILEFRAG_PROG -v $1  >> $seq.full 2>&1
>  }
>  
>  # Defrag file, check it, and remove it.
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-03-01 15:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 14:17 [PATCH v2] xfstests: use right defrag program path Zheng Liu
2013-03-01 14:17 ` Zheng Liu
2013-03-01 15:48 ` Eric Sandeen [this message]
2013-03-01 15:48   ` Eric Sandeen
2013-03-05 15:55   ` Rich Johnston
2013-03-05 15:55     ` Rich Johnston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5130CDC1.8060704@redhat.com \
    --to=sandeen@redhat.com \
    --cc=david@fromorbit.com \
    --cc=gnehzuil.liu@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=wenqing.lz@taobao.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.