From: Christoph Hellwig <hch@infradead.org>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs mailing list <xfs@oss.sgi.com>,
ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] xfstests: very basic defragmentation testing for xfs & ext4
Date: Sat, 18 Jul 2009 10:31:14 -0400 [thread overview]
Message-ID: <20090718143114.GC20905@infradead.org> (raw)
In-Reply-To: <4A5E3A37.5050306@redhat.com>
On Wed, Jul 15, 2009 at 03:21:11PM -0500, Eric Sandeen wrote:
> Test a few very basic defragmentation scenarios.
>
> This test creates some files, runs defrag on them,
> and compares the before/after fragmentation as well
> as file md5sums and timestamps.
>
> (md5sums may just be reading buffered data though,
> suggestions?)
As Andreas said unmount it before.
> The test currently expects to find e4defrag in
> /usr/bin
> +_supported_fs xfs ext4
> +fragfile=$SCRATCH_MNT/fragfile.$$
> +
> +if [ "$FSTYP" == "xfs" ]; then
> + DEFRAG=/usr/sbin/xfs_fsr
> +else
> + DEFRAG=/usr/bin/e4defrag
> +fi
> +
> +_require_command $DEFRAG
> +_require_command /usr/sbin/filefrag
I think we're much better off adding a helpers for this in a new
common.defrag (or adding it somwhere).
Then set a DEFRAF_PROG variable there, and add a _require_defrag
ala
_require_defrag()
{
case "$FSTYP" in
xfs)
DEFRAG_PROG=/usr/sbin/xfs_fsr
;;
ext4)
DEFRAG_PROG=/usr/bin/e4defrag
;;
*)
_notrun "defragmentation not supported for fstype \"$FSTYP\""
;;
esac
_require_command $DEFRAG
_require_command /usr/sbin/filefrag
}
next prev parent reply other threads:[~2009-07-18 14:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 20:21 [PATCH] xfstests: very basic defragmentation testing for xfs & ext4 Eric Sandeen
2009-07-15 21:30 ` Andreas Dilger
2009-07-15 21:47 ` Eric Sandeen
2009-07-18 14:31 ` Christoph Hellwig [this message]
2009-07-18 16:30 ` Eric Sandeen
2009-08-06 4:31 ` [PATCH V2] xfstests 218: " Eric Sandeen
2009-08-10 14:09 ` Christoph Hellwig
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=20090718143114.GC20905@infradead.org \
--to=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.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 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).