From: Eryu Guan <guaneryu@gmail.com>
To: fdmanana@kernel.org
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH] btrfs/232: fix umount failure due to fsstress still running
Date: Sun, 21 Mar 2021 21:13:01 +0800 [thread overview]
Message-ID: <YFdGXfemIyoal44X@desktop> (raw)
In-Reply-To: <024df0e67e78e0a77fedef4f6451eab6b26326b6.1616068024.git.fdmanana@suse.com>
On Thu, Mar 18, 2021 at 11:48:15AM +0000, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> We start a process that runs fsstress, then kill the process, wait for it
> to die and then end the test, where we attempt to unmount the fs which
> often fails because the fsstress subcommand started by the process is
> still running and using the mount point. This results in a test failure:
>
> btrfs/232 1s ... umount: /home/fdmanana/btrfs-tests/scratch_1: target is busy.
> _check_btrfs_filesystem: filesystem on /dev/sdc is inconsistent
> (see /home/fdmanana/git/hub/xfstests/results//btrfs/232.full for details)
>
> Fix that by adding a trap to the writer() function.
>
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Thanks for the fix! I missed that in review..
Thanks,
Eryu
> ---
> tests/btrfs/232 | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tests/btrfs/232 b/tests/btrfs/232
> index b0a04a61..b9841410 100755
> --- a/tests/btrfs/232
> +++ b/tests/btrfs/232
> @@ -32,6 +32,10 @@ _cleanup()
>
> writer()
> {
> + # Wait for running fsstress subcommand before exitting so that
> + # mountpoint is not busy when we try to unmount it.
> + trap "wait; exit" SIGTERM
> +
> while true; do
> args=`_scale_fsstress_args -p 20 -n 1000 $FSSTRESS_AVOID -d $SCRATCH_MNT/stressdir`
> $FSSTRESS_PROG $args >/dev/null 2>&1
> --
> 2.28.0
prev parent reply other threads:[~2021-03-21 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 11:48 [PATCH] btrfs/232: fix umount failure due to fsstress still running fdmanana
2021-03-21 13:13 ` Eryu Guan [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=YFdGXfemIyoal44X@desktop \
--to=guaneryu@gmail.com \
--cc=fdmanana@kernel.org \
--cc=fdmanana@suse.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