From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: Eryu Guan <eguan@redhat.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
chandan@mykolab.com
Subject: Re: [RFC PATCH] btrfs/066: Fix race condition by making 'subvolume stress' task to exit gracefully
Date: Thu, 17 Mar 2016 14:42:36 +0530 [thread overview]
Message-ID: <1612703.LcIZZjmlu9@localhost.localdomain> (raw)
In-Reply-To: <20160317072339.GW11419@eguan.usersys.redhat.com>
On Thursday 17 Mar 2016 15:23:39 Eryu Guan wrote:
> A named pipe seems too heavy and complicated to me. How about breaking
> out the loop in _btrfs_stress_subvolume on the existence of some file?
> e.g.
>
> _btrfs_stress_subvolume():
> ...
> local stop_file=$5
> while [ ! -e $stop_file ]; do
> ...
> done
>
> run_test():
> ...
> local stop_file=$TEST_DIR/$seq.stop.$$
> ...
> # make sure the stop sign is not there
> rm -f $stop_file
> _btrfs_stress_subvolume $SCRATCH_DEV $SCRATCH_MNT subvol_$$
$subvol_mnt
> $stop_file & ...
> wait $fsstress_pid
> touch $stop_file
> kill $scrub_pid
> wait
>
Yes, you are right. This above method is much simpler. I will send out a patch
with the new fix.
--
chandan
prev parent reply other threads:[~2016-03-17 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 6:14 [RFC PATCH] btrfs/066: Fix race condition by making 'subvolume stress' task to exit gracefully Chandan Rajendra
2016-03-17 7:23 ` Eryu Guan
2016-03-17 9:12 ` Chandan Rajendra [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=1612703.LcIZZjmlu9@localhost.localdomain \
--to=chandan@linux.vnet.ibm.com \
--cc=chandan@mykolab.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).