Thread (13 messages) 13 messages, 2 authors, 2016-02-29

Re: [PATCH v2 RESEND 5/5] fstests: btrfs: Test inband dedup with balance.

From: Dave Chinner <david@fromorbit.com>
Date: 2016-02-28 22:42:43
Also in: fstests

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 <redacted>
---
...
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help