From: "Luís Henriques" <lhenriques@suse.de>
To: Xiubo Li <xiubli@redhat.com>
Cc: idryomov@gmail.com, ceph-devel@vger.kernel.org,
jlayton@kernel.org, vshankar@redhat.com, mchangir@redhat.com
Subject: Re: [PATCH v4] ceph: drop the messages from MDS when unmounting
Date: Thu, 30 Mar 2023 09:59:47 +0100 [thread overview]
Message-ID: <87r0t64nss.fsf@suse.de> (raw)
In-Reply-To: <cc0f3aac-39be-4dd3-dc5e-611923680047@redhat.com> (Xiubo Li's message of "Thu, 30 Mar 2023 09:33:10 +0800")
Xiubo Li <xiubli@redhat.com> writes:
> On 29/03/2023 22:41, Luís Henriques wrote:
<...>
> This also looks good to me. As I remembered when reading the kernel code I just
> saw another place in VFS is also doing like this and I just followed it.
>> But... even with my suggestion, can't we deadlock here if we get preempted
>> just before the wait_for_completion() and ceph_dec_stopping_blocker() is
>> executed?
>
> Good question. Actually it won't.
Yeah, you're right. Doh!
> The 'x->done' member in the completion will be initialized as 0, and the
> complete_all() will set it to 'UINT_MAX'. And only when 'x->done == 0' will the
> wait_for_completion() go to sleep and wait.
Cheers,
--
Luís
prev parent reply other threads:[~2023-03-30 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 3:05 [PATCH v4] ceph: drop the messages from MDS when unmounting xiubli
2023-03-29 14:41 ` Luís Henriques
2023-03-30 1:33 ` Xiubo Li
2023-03-30 8:59 ` Luís Henriques [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=87r0t64nss.fsf@suse.de \
--to=lhenriques@suse.de \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=jlayton@kernel.org \
--cc=mchangir@redhat.com \
--cc=vshankar@redhat.com \
--cc=xiubli@redhat.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