Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1432958
| From | Christoph Hellwig <hch@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] virtio-blk: Generate uevent after attribute available |
| Date | 2016-06-28 14:40 +0200 |
| Message-ID | <rP0t4-730-37@gated-at.bofh.it> (permalink) |
| References | <rOR6p-EK-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] virtio-blk: Generate uevent after attribute available Fam Zheng <famz@redhat.com> - 2016-06-28 04:40 +0200
Re: [PATCH] virtio-blk: Generate uevent after attribute available Christoph Hellwig <hch@infradead.org> - 2016-06-28 14:40 +0200
Re: [PATCH] virtio-blk: Generate uevent after attribute available Fam Zheng <famz@redhat.com> - 2016-06-29 03:30 +0200
csiph-web