mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Nilay Shroff <nilay@linux.ibm.com>
Cc: hch@lst.de, kbusch@kernel.org, sagi@grimberg.me, kch@nvidia.com,
	 linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	gjoyce@linux.ibm.com
Subject: Re: [PATCH v2 1/2] nvmet: defer setting ns->enabled to false in nvmet_ns_disable()
Date: Fri, 2 Oct 2026 05:20:26 +0200	[thread overview]
Message-ID: <ar8h9B_P6fZhtWPy@shinmob> (raw)
In-Reply-To: <04909105-bcbd-4b89-af41-ad761aaa9af2@linux.ibm.com>

On Oct 01, 2026 / 17:12, Nilay Shroff wrote:
[...]
> > Recent blktests-ci trial runs for nvme-7.3 branch reported failure of nvme/052
> > [*]. It is required to repeat the test case 3 to 20 times to recreate the
> > failure on my test system. I bisected and find this patch is the trigger of the
> > failure.
> > 
> > Nilay, may I ask you to take a look in the failure? I'm not sure if this should
> > be addressed in kernel side of blktests side.
> 
> Thanks for the report! I looked into the failure and I think I found the root cause.
> I couldn't reproduce it on my system, but I see there is a narrow race window that can
> potentially trigger the observed failure.
> 
> I don't think this is a new race introduced by this patch. However, the changes in this
> patch may have altered the timing enough to make the race easier to trigger.
> 
> In nvmet_ns_enable(), we currently queue the asynchronous namespace-change event
> before setting ns->enabled and the corresponding NVMET_NS_ENABLED xarray mark.
> Therefore, if the asynchronous namespace-change event is received and processed
> by the host before the namespace is fully enabled on the target, the host may not
> find the namespace while scanning the active namespace list.
> 
> To close this race, I think we should send the namespace-change notification only
> after the namespace has been fully enabled in nvmet_ns_enable(). In particular,
> we can move nvmet_ns_changed() after setting ns->enabled, the NVMET_NS_ENABLED
> xarray mark, and NVMET_NS_IO_LIVE.
> 
> Could you please try the following change on your test system and let me know if
> it fixes the failure? If this resolves the issue, I'll send a formal patch:

(snip)

Thank you for this swift action. I applied the fix trial change on top of the
kernel at the nvme-7.3 branch (git hash 4a5e49ba0abb), and confirmed the failure
goes away by repeating the test case nvme/052 one hundred times. Good :)

When you post the fix as the formal patch, please feel free to add,

Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

  reply	other threads:[~2026-10-02  3:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 16:27 [PATCH v2 0/2] nvmet: fix subtle race in I/O processing and ns configuration Nilay Shroff
2026-09-18 16:27 ` [PATCH v2 1/2] nvmet: defer setting ns->enabled to false in nvmet_ns_disable() Nilay Shroff
2026-09-21  6:59   ` Christoph Hellwig
2026-10-01  5:55   ` Shin'ichiro Kawasaki
2026-10-01 11:42     ` Nilay Shroff
2026-10-02  3:20       ` Shin'ichiro Kawasaki [this message]
2026-09-18 16:27 ` [PATCH v2 2/2] nvmet: don't allow I/O admission after percpu ns reference is killed Nilay Shroff
2026-09-21  6:59   ` Christoph Hellwig
2026-09-22 14:59 ` [PATCH v2 0/2] nvmet: fix subtle race in I/O processing and ns configuration Keith Busch
2026-09-22 15:04   ` Keith Busch

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=ar8h9B_P6fZhtWPy@shinmob \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=gjoyce@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=nilay@linux.ibm.com \
    --cc=sagi@grimberg.me \
    /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

all inboxes | Powered by JetHome®