All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio-blk: Generate uevent after attribute available
Date: Sat, 3 Sep 2016 01:56:43 +0300	[thread overview]
Message-ID: <20160903015630-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20160629012414.GA23296@ad.usersys.redhat.com>

On Wed, Jun 29, 2016 at 09:24:15AM +0800, Fam Zheng wrote:
> On Tue, 06/28 04:45, Christoph Hellwig wrote:
> > On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote:
> > > Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that
> > > point we haven't created the serial attribute file, therefore depending
> > > on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
> > > created.
> > > 
> > > This race condition can be easily reproduced by hot plugging a number of
> > > virtio-blk disks.
> > > 
> > > Also in systemd, there used to be a related workaround in udev rules
> > > called 'WAIT_FOR="serial"', but it is removed in later versions.
> > > 
> > > Now let's generate a KOBJ_CHANGE event after the attributes are ready.
> > 
> > The same race is present in other drivers as well, e.g. nvme.  Please
> > find a way to make this work properly without needing to hack every
> > driver to send events manually.
> 
> OK, I'll take a look today!
> 
> Fam

Was this fixed in the generic code?

-- 
MST

  reply	other threads:[~2016-09-02 22:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28  2:39 [PATCH] virtio-blk: Generate uevent after attribute available Fam Zheng
2016-06-28  2:39 ` Fam Zheng
2016-06-28 11:45 ` Christoph Hellwig
2016-06-28 11:45   ` Christoph Hellwig
2016-06-29  1:24   ` Fam Zheng
2016-06-29  1:24     ` Fam Zheng
2016-09-02 22:56     ` Michael S. Tsirkin [this message]
2016-09-03  7:08       ` Fam Zheng

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=20160903015630-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=famz@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.