From: Sidong Yang <realwakka@gmail.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"fstests@vger.kernel.org" <fstests@vger.kernel.org>,
Filipe Manana <fdmanana@kernel.org>,
"dsterba@suse.cz" <dsterba@suse.cz>
Subject: Re: [PATCH] btrfs: add test for enable/disable quota and create/destroy qgroup repeatedly
Date: Wed, 2 Mar 2022 13:47:04 +0000 [thread overview]
Message-ID: <20220302134704.GB2682@realwakka> (raw)
In-Reply-To: <20220302082447.qetrvidwqlqkungi@shindev>
On Wed, Mar 02, 2022 at 08:24:48AM +0000, Shinichiro Kawasaki wrote:
> On Mar 02, 2022 / 06:26, Sidong Yang wrote:
> > On Wed, Mar 02, 2022 at 04:43:35AM +0000, Shinichiro Kawasaki wrote:
> >
> > Hi, Shinichiro.
> >
> > Thanks for reply!
> >
> > > Hi Sidong,
> > >
> > > I tried this patch and observed that it recreates the hang and confirms the fix.
> > > Thanks. Here's my comments for improvements.
> > >
> > > On Mar 01, 2022 / 15:19, Sidong Yang wrote:
> > > > Test enabling/disable quota and creating/destroying qgroup repeatedly
> > >
> > > nit: gerund (...ing) and base form are mixed. Base form would be the better to
> > > be same as the code comment.
> >
> > Yeah, 'disable' should be disabling.
> > >
> > > > in asynchronous and confirm it does not cause kernel hang. This is a
> > > > regression test for the problem reported to linux-btrfs list [1].
> > > >
> > > > The hang was recreated using the test case and fixed by kernel patch
> > > > titled
> > > >
> > > > btrfs: qgroup: fix deadlock between rescan worker and remove qgroup
> > > >
> > > > [1] https://lore.kernel.org/linux-btrfs/20220228014340.21309-1-realwakka@gmail.com/
> > > >
> > > > Signed-off-by: Sidong Yang <realwakka@gmail.com>
> > > > ---
>
> (snip)
>
> > > > + done
> > > > +
> > > > + for pid in "${pids[@]}"; do
> > > > + wait $pid
> > > > + done
> > >
> > > I think simple "wait" command does what the for loop does.
> >
> > I didn't know that "wait" command with no parameter waits all background
> > processes to finish. So it seems that we don't need pids it can be
> > deleted. Thanks.
> >
> > Actually I've been agony about this. Does it needs timeout? When I tried
> > to command like this "timeout 10s wait", This command couldn't be
> > executed becase "wait" command is not binary. How can I insert timeout?
>
> I think recent discussion on the list is a good reference [1]. A patch was
> posted to add timeout to btrfs/255.
>
> More importantly, it was discussed that such timeout of user space program will
> not help. Eryu pointed out that once "the kernel already deadlocked, and
> filesystem and/or device can't be used by next test either". IMHO, your new case
> will not require timeout either with same reasoning.
>
> [1] https://lore.kernel.org/fstests/20220223171126.GQ12643@twin.jikos.cz/T/#me349d62ff367a0a6a28076bdd5b89263fc8109c0
>
Thanks for a good example. I understand that there is no help in
userspace for the kernel deadlocked. In this case, Just "wait" is
enough.
Thanks,
Sidong
> --
> Best Regards,
> Shin'ichiro Kawasaki
next prev parent reply other threads:[~2022-03-02 13:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 15:19 [PATCH] btrfs: add test for enable/disable quota and create/destroy qgroup repeatedly Sidong Yang
2022-03-02 4:43 ` Shinichiro Kawasaki
2022-03-02 6:26 ` Sidong Yang
2022-03-02 8:24 ` Shinichiro Kawasaki
2022-03-02 13:47 ` Sidong Yang [this message]
2022-03-02 12:10 ` Filipe Manana
2022-03-02 13:43 ` Sidong Yang
2022-03-02 15:12 ` Filipe Manana
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=20220302134704.GB2682@realwakka \
--to=realwakka@gmail.com \
--cc=dsterba@suse.cz \
--cc=fdmanana@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox