From: Ira Weiny <ira.weiny@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, Ira Weiny <ira.weiny@intel.com>
Cc: Li Chen <me@linux.beauty>,
Dan Williams <dan.j.williams@intel.com>,
"Vishal Verma" <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
"Pankaj Gupta" <pankaj.gupta.linux@gmail.com>,
Cornelia Huck <cohuck@redhat.com>,
Jakub Staron <jstaron@google.com>, <nvdimm@lists.linux.dev>,
<virtualization@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nvdimm: virtio_pmem: serialize flush requests
Date: Mon, 2 Feb 2026 11:18:13 -0600 [thread overview]
Message-ID: <6980dc5569d5a_3430210092@iweiny-mobl.notmuch> (raw)
In-Reply-To: <20260131124628-mutt-send-email-mst@kernel.org>
Michael S. Tsirkin wrote:
> On Fri, Jan 30, 2026 at 02:52:12PM -0600, Ira Weiny wrote:
> > Li Chen wrote:
[snip]
> > > diff --git a/drivers/nvdimm/nd_virtio.c b/drivers/nvdimm/nd_virtio.c
> > > index c3f07be4aa22..827a17fe7c71 100644
> > > --- a/drivers/nvdimm/nd_virtio.c
> > > +++ b/drivers/nvdimm/nd_virtio.c
> > > @@ -44,19 +44,24 @@ static int virtio_pmem_flush(struct nd_region *nd_region)
> > > unsigned long flags;
> > > int err, err1;
> > >
> > > + might_sleep();
> > > + mutex_lock(&vpmem->flush_lock);
> >
> > Assuming this does fix a bug I'd rather use guard here.
>
> Do you, from code review, agree with the logic that
> it's racy right now?
I do now. I was hoping to understand the test being run. The additional
detail that it takes multiple runs helps.
> Whether the bug is reproducible isn't really the question.
>
True. But we should still use guard(). I'll look for v2.
Ira
next prev parent reply other threads:[~2026-02-02 17:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-13 3:45 [PATCH] nvdimm: virtio_pmem: serialize flush requests Li Chen
2026-01-30 20:52 ` Ira Weiny
2026-01-31 17:46 ` Michael S. Tsirkin
2026-02-01 4:40 ` Li Chen
2026-01-31 17:47 ` Michael S. Tsirkin
2026-02-02 17:18 ` Ira Weiny [this message]
2026-02-01 4:21 ` Li Chen
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=6980dc5569d5a_3430210092@iweiny-mobl.notmuch \
--to=ira.weiny@intel.com \
--cc=cohuck@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=jstaron@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=me@linux.beauty \
--cc=mst@redhat.com \
--cc=nvdimm@lists.linux.dev \
--cc=pankaj.gupta.linux@gmail.com \
--cc=virtualization@lists.linux.dev \
--cc=vishal.l.verma@intel.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