From: Dave Chinner <david@fromorbit.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 RESEND 5/5] fstests: btrfs: Test inband dedup with balance.
Date: Mon, 29 Feb 2016 09:42:28 +1100 [thread overview]
Message-ID: <20160228224228.GD29057@dastard> (raw)
In-Reply-To: <1456301196-15874-6-git-send-email-quwenruo@cn.fujitsu.com>
On Wed, Feb 24, 2016 at 04:06:36PM +0800, Qu Wenruo wrote:
> Btrfs balance will reloate date extent, but its hash is removed too late
> at run_delayed_ref() time, which will cause extent ref increased
> increased during balance, cause either find_data_references() gives
> WARN_ON() or even run_delayed_refs() fails and cause transaction abort.
>
> Add such concurrency test for inband dedup and balance.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
...
> +for n in $(seq 1 $nr); do
> + $XFS_IO_PROG -f -c "pwrite -b $dedup_bs 0 $dedup_bs" \
> + ${file}_${n} > /dev/null 2>&1
> +done
_populate_fs(), please.
> +
> +kill $balance_pid &> /dev/null
> +wait
> +
> +# Sometimes even we killed $balance_pid and wait returned,
> +# balance may still be running, use balance cancel to wait it.
> +_run_btrfs_util_prog balance cancel $SCRATCH_MNT &> /dev/null
This needs to be in the cleanup function.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2016-02-28 22:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 8:06 [PATCH v2 RESEND 0/5] Btrfs in-band de-duplication tests cases Qu Wenruo
2016-02-24 8:06 ` [PATCH v2 RESEND 1/5] fstests: rename _require_btrfs to _require_btrfs_subcommand Qu Wenruo
2016-02-24 8:06 ` [PATCH v2 RESEND 2/5] fstests: btrfs: Add basic test for btrfs in-band de-duplication Qu Wenruo
2016-02-28 22:26 ` Dave Chinner
2016-02-29 2:04 ` Qu Wenruo
2016-02-29 2:04 ` Qu Wenruo
2016-02-29 6:43 ` Dave Chinner
2016-02-29 7:55 ` Qu Wenruo
2016-02-29 7:55 ` Qu Wenruo
2016-02-24 8:06 ` [PATCH v2 RESEND 3/5] fstests: btrfs: Add testcase for btrfs dedup enable disable race test Qu Wenruo
2016-02-28 22:29 ` Dave Chinner
2016-02-24 8:06 ` [PATCH v2 RESEND 4/5] fstests: btrfs: Add per inode dedup flag test Qu Wenruo
2016-02-28 22:39 ` Dave Chinner
2016-02-24 8:06 ` [PATCH v2 RESEND 5/5] fstests: btrfs: Test inband dedup with balance Qu Wenruo
2016-02-28 22:42 ` Dave Chinner [this message]
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=20160228224228.GD29057@dastard \
--to=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.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.