LKML Archive mirror
 help / color / mirror / Atom feed
From: Wouter Verhelst <w@uter.be>
To: Markus Pargmann <mpa@pengutronix.de>
Cc: nbd-general <nbd-general@lists.sourceforge.net>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] nbd: Issue a uevent when disconnecting
Date: Fri, 5 Feb 2016 10:42:41 +0100	[thread overview]
Message-ID: <20160205094241.GC6366@grep.be> (raw)
In-Reply-To: <5247002.OuBHJMaBYj@adelgunde>

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 :-)

-- 
It is easy to love a country that is famous for chocolate and beer

  -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26

  reply	other threads:[~2016-02-05  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 16:23 [PATCH] Issue a uevent when disconnecting Wouter Verhelst
2016-02-02 15:27 ` [PATCH v2] nbd: " Wouter Verhelst
2016-02-05  9:03   ` Markus Pargmann
2016-02-05  9:42     ` Wouter Verhelst [this message]
2016-02-12 14:49       ` Markus Pargmann
2016-02-05  9:04   ` [PATCH] nbd: Create size change events for userspace Markus Pargmann

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=20160205094241.GC6366@grep.be \
    --to=w@uter.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    --cc=nbd-general@lists.sourceforge.net \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).