All of lore.kernel.org
 help / color / mirror / Atom feed
From: james.smart@broadcom.com (James Smart)
Subject: [PATCH rfc 0/3] add support to discovery async event notifications
Date: Tue, 16 Oct 2018 10:59:58 -0700	[thread overview]
Message-ID: <193097d1-b39b-f152-d60b-8bddbc3ee4b1@broadcom.com> (raw)
In-Reply-To: <8c3dc9a9-f222-87e9-383f-d319fb0a86df@suse.de>



On 10/15/2018 10:59 PM, Hannes Reinecke wrote:
> On 10/16/18 3:11 AM, Sagi Grimberg wrote:
>>
>>>> Oh, I don't doubt that it'll work in the sense that 'nvme 
>>>> connect-all' is executed.
>>>> I _do_ doubt that the 'disown' is doing anything at all; both '&' 
>>>> and 'disown' will be used as arguments to '/usr/sbin/nvme', and 
>>>> _not_ interpreted by any shell (as no shell is invoked in the first 
>>>> place).
>>>> Internally udev will call 'execve' to call the new program, which 
>>>> will invoke a shell only for shell scripts; binary programs will be 
>>>> executed directly with not shell whatsoever.
>>>
>>> I see, we can run it with /bin/sh and it should do the trick?
>>
>> Hannes,
>>
>> Do you agree that it would suffice? Or, Do you think we should take
>> a different approach?
>>
>> Would like to get some feedback from others given that this is not
>> a trivial decision about which way we go here..
>
> Actually, I have looked at the original solution from James Smart for 
> FC-NVMe autoconnect.
>
> Essentially he starts a system service from a udev rule, which in 
> itself is triggered by the event.
> With that we're out of the udev program timeout (as systemd services 
> can run for arbitrarily long) _and_ we also have resolved the problem 
> of a uevent storm, as systemd will manage that for us.
>
> The only problem here is that we need to pass arguments to the systemd 
> service, but if we can use the standard udev trick of placing the 
> arguments into the program environment and having the program looking 
> for that we should be able to solve that, too.

fyi - the udev script fc uses passes arguments (HOST_TRADDR and TRADDR) 
from the event into the systemd service. Actually, it creates an 
instance of the service based on the names built from those arguments.

Passing different arguments beyond that seemed rather difficult. For 
that I was assuming the instance arguments would have to be parsed, and 
a system file extracted, to obtain any variable values (such as 
device-specific connect timeouts, or queue count limits, etc).


-- jmes

  reply	other threads:[~2018-10-16 17:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 21:23 [PATCH rfc 0/3] add support to discovery async event notifications Sagi Grimberg
2018-10-04 21:23 ` [PATCH rfc 1/3] nvme-fabrics: allow discovery subsystems accept a kato Sagi Grimberg
2018-10-05  5:50   ` Hannes Reinecke
2018-10-04 21:23 ` [PATCH rfc 2/3] nvme: enable aen also for discovery controllers Sagi Grimberg
2018-10-05  5:51   ` Hannes Reinecke
2018-10-04 21:23 ` [PATCH rfc 3/3] nvme: fire discovery log page change events to userspace Sagi Grimberg
2018-10-05  5:51   ` Hannes Reinecke
2018-10-04 21:23 ` [PATCH 4/3 rfc nvme-cli] fabrics: support persistent connections to a discovery controller Sagi Grimberg
2018-10-04 21:23 ` [PATCH 5/3 rfc nvme-cli] fabrics: allow user to retrieve discovery log from existing " Sagi Grimberg
2018-10-05  5:50 ` [PATCH rfc 0/3] add support to discovery async event notifications Hannes Reinecke
2018-10-05  7:08   ` Sagi Grimberg
2018-10-05  7:36     ` Hannes Reinecke
2018-10-05 19:34       ` Sagi Grimberg
2018-10-16  1:11         ` Sagi Grimberg
2018-10-16  5:59           ` Hannes Reinecke
2018-10-16 17:59             ` James Smart [this message]
2018-10-17 15:29               ` Hannes Reinecke
2018-10-19  0:44                 ` Sagi Grimberg
2018-10-19 16:09                 ` James Smart
2018-10-17  0:38             ` Sagi Grimberg

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=193097d1-b39b-f152-d60b-8bddbc3ee4b1@broadcom.com \
    --to=james.smart@broadcom.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 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.