linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 02/15 v2] btrfs: new test to run btrfs balance and scrub simultaneously
Date: Mon, 8 Sep 2014 20:04:41 +1000	[thread overview]
Message-ID: <20140908100441.GG30012@dastard> (raw)
In-Reply-To: <1409233676-22787-3-git-send-email-eguan@redhat.com>

On Thu, Aug 28, 2014 at 09:47:43PM +0800, Eryu Guan wrote:
> Run btrfs balance and scrub operations simultaneously with fsstress
> running in background.
> +run_test()
> +{
> +	local mkfs_opts=$1
> +
> +	echo "Test $mkfs_opts" >>$seqres.full
> +
> +	# dup only works on single device
> +	if [[ "$mkfs_opts" =~ dup ]]; then
> +		_scratch_mkfs $mkfs_opts >>$seqres.full 2>&1
> +	else
> +		_scratch_pool_mkfs $mkfs_opts >>$seqres.full 2>&1
> +	fi
> +	# make sure we created btrfs with desired options
> +	if [ $? -ne 0 ]; then
> +		echo "mkfs $mkfs_opts failed"
> +		return
> +	fi
> +	_scratch_mount >>$seqres.full 2>&1

This mkfs/mount code is repeated in all of the first three tests.
Factor, please.

> +	$BTRFS_UTIL_PROG filesystem sync $SCRATCH_MNT >/dev/null 2>&1
> +	_scratch_unmount
> +	_check_scratch_fs

And why, exactly do we need a special btrfs "sync" before unmount?
THose three lines should be just one: _check_scratch_fs

If the test actually requires a special btrfs hack before unmount,
add a comment explaining why that hack is necessary....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2014-09-08 10:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-28 13:47 [PATCH 00/15 v2] xfstests: new btrfs stress test cases Eryu Guan
2014-08-28 13:47 ` [PATCH 01/15 v2] btrfs: new test to run btrfs balance and subvolume test simultaneously Eryu Guan
2014-09-08 10:01   ` Dave Chinner
2014-09-09 11:53     ` Eryu Guan
2014-09-09 23:53       ` Dave Chinner
2014-09-09 15:41     ` Eric Sandeen
2014-08-28 13:47 ` [PATCH 02/15 v2] btrfs: new test to run btrfs balance and scrub simultaneously Eryu Guan
2014-09-08 10:04   ` Dave Chinner [this message]
2014-09-09 11:55     ` Eryu Guan
2014-08-28 13:47 ` [PATCH 03/15 v2] btrfs: new test to run btrfs balance and defrag operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 04/15 v2] btrfs: new case to run btrfs balance and remount with different compress algorithms Eryu Guan
2014-09-08 10:08   ` Dave Chinner
2014-09-09 13:06     ` Eryu Guan
2014-08-28 13:47 ` [PATCH 05/15 v2] btrfs: new case to run btrfs balance and device replace operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 06/15 v2] btrfs: new case to run btrfs subvolume create/delete operations and device replace simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 07/15 v2] btrfs: new case to run btrfs subvolume create/delete operations and scrub simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 08/15 v2] btrfs: new case to run btrfs subvolume create/delete and defrag operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 09/15 v2] btrfs: new case to run subvolume create/delete and remount with defferent compress algorithms Eryu Guan
2014-08-28 13:47 ` [PATCH 10/15 v2] btrfs: new case to run device replace and scrub operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 11/15 v2] btrfs: new case to run device replace and defrag " Eryu Guan
2014-08-28 13:47 ` [PATCH 12/15 v2] btrfs: new case to run device replace and remount with different compress algorithms simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 13/15 v2] btrfs: new case to run btrfs scrub and defrag operations simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 14/15 v2] btrfs: new case to run btrfs scrub and remount with different compress algorithms simultaneously Eryu Guan
2014-08-28 13:47 ` [PATCH 15/15 v2] btrfs: new case to run defrag " Eryu Guan
2014-09-08  9:54 ` [PATCH 00/15 v2] xfstests: new btrfs stress test cases Dave Chinner

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=20140908100441.GG30012@dastard \
    --to=david@fromorbit.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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).