Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1332790
| From | Markus Pargmann <mpa@pengutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] nbd: Issue a uevent when disconnecting |
| Date | 2016-02-12 15:50 +0100 |
| Message-ID | <r1ncK-8iz-7@gated-at.bofh.it> (permalink) |
| References | <qU9Rg-5Q5-1@gated-at.bofh.it> <qYKyR-6DW-3@gated-at.bofh.it> <qYLbz-6TD-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi Wouter, On Friday, February 05, 2016 10:42:41 AM Wouter Verhelst wrote: > Hi Markus, > > On Fri, Feb 05, 2016 at 10:03:41AM +0100, Markus Pargmann wrote: > > Hi Wouter, > > > > On Tuesday, February 02, 2016 04:27:00 PM Wouter Verhelst wrote: > > > There already is a uevent by default when closing a device upon connect > > > of the device. However, the same isn't true on disconnect. > > > > > > This makes it hard for userspace to keep track of whether a device is > > > connected, since we are notified when the connection is created, but not > > > when it is removed again. > > > > > > Explicitly issue a "change" uevent to remedy. > > > > > > [v2: incorporate feedback from udev maintainer and make sure that we > > > issue a uevent upon connect as well as disconnect, rather than connect > > > only] > > > > The systemd people had the same feedback. > > Well, the systemd people and the udev people are the same people these > days :-) > > > Basically the device is not marked as ready until a uevent is received. My > > idea was to use the size property consistently. If the device is connected > > the size is correctly changed and a uevent is created. On disconnect the size > > is set to 0 with another uevent. > > > > Does this work for you as well? I will send the patch as reply. > > Sure. What matters most is that the uevent is done; how it's done, less > so. > > I should add that this was meant to go with systemd #2422. I wasn't > aware of #358, or I would've talked to you more :-) Ah I see, thanks. I wrote some tests yesterday to ensure that I don't break other things with the new size calculations. I will send the pull request with this patch for 4.6. Best Regards, Markus -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v2] nbd: Issue a uevent when disconnecting Markus Pargmann <mpa@pengutronix.de> - 2016-02-12 15:50 +0100
csiph-web