linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Christoph Hellwig <hch@lst.de>,
	Josef Bacik <josef@toxicpanda.com>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH] nbd: Fix races introduced by nbd_index_mutex scope reduction
Date: Wed, 25 Aug 2021 16:18:47 +0200	[thread overview]
Message-ID: <20210825141847.GA24740@lst.de> (raw)
In-Reply-To: <16109a71-c366-b27e-8501-51e7fe950729@i-love.sakura.ne.jp>

On Wed, Aug 25, 2021 at 10:38:00PM +0900, Tetsuo Handa wrote:
> I guess you might want below diff, for reinit_completion() immediately after
> complete_all() likely resets completion count before all threads sleeping at
> wait_for_completion_timeout() check the completion count.
> Use of simple sequence count will be robuster.

Yes, this is very simple to what I have locally.

  reply	other threads:[~2021-08-25 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21 15:46 [PATCH] nbd: Fix races introduced by nbd_index_mutex scope reduction Tetsuo Handa
2021-08-25 13:15 ` Christoph Hellwig
2021-08-25 13:38   ` Tetsuo Handa
2021-08-25 14:18     ` Christoph Hellwig [this message]
2021-08-25 14:19       ` Christoph Hellwig

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=20210825141847.GA24740@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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).