From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alasdair G Kergon <agk@redhat.com>,
dm-devel@redhat.com, linux-kernel@vger.kernel.org,
Mike Anderson <andmike@us.ibm.com>,
netdev@vger.kernel.org
Subject: Re: [2.6.23 PATCH 14/18] dm: netlink add to core
Date: Thu, 12 Jul 2007 09:07:07 -0600 [thread overview]
Message-ID: <m1bqehfyp0.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20070711143423.36722a41.akpm@linux-foundation.org> (Andrew Morton's message of "Wed, 11 Jul 2007 14:34:23 -0700")
Andrew Morton <akpm@linux-foundation.org> writes:
> On Wed, 11 Jul 2007 22:01:59 +0100
> Alasdair G Kergon <agk@redhat.com> wrote:
>
>> From: Mike Anderson <andmike@us.ibm.com>
>>
>> This patch adds support for the dm_path_event dm_send_event funtions which
>> create and send netlink attribute events.
>>
>> ...
>>
>> --- linux.orig/drivers/md/dm-netlink.c 2007-07-11 21:37:50.000000000 +0100
>> +++ linux/drivers/md/dm-netlink.c 2007-07-11 21:37:51.000000000 +0100
>> @@ -40,6 +40,17 @@ struct dm_event_cache {
>>
>> static struct dm_event_cache _dme_cache;
>>
>> +struct dm_event {
>> + struct dm_event_cache *cdata;
>> + struct mapped_device *md;
>> + struct sk_buff *skb;
>> + struct list_head elist;
>> +};
>> +
>> +static struct sock *_dm_netlink_sock;
>> +static uint32_t _dm_netlink_daemon_pid;
>> +static DEFINE_SPINLOCK(_dm_netlink_pid_lock);
>
> The usage of this lock makes my head spin a bit. It's a shame it wasn't
> documented.
>
> There's obviously something very significant happening with process IDs in
> here. A description of the design would be helpful. Especially for the
> containerisation guys who no doubt will need to tear their hair out over it
> all ;)
Andrew this actually has nothing to do with process IDs. The pid
referred to here is the netlink port number. It just happens to be called
a pid.
In this case netlink is being used to simply broadcast events.
I may be a little off but looking at the events types defined.
device down, device up. Defining a completely new interface for this
looks absolutely absurd.
This is device hotplug isn't it? As such we should be using the
hotplug infrastructure and not reinventing the wheel here.
If it isn't hotplug it looks like something that inotify should
handle.
If that isn't the case I am fairly certain that md already has a
mechanism to handle this, and those two should stay in sync
if at all possible on this kind of thing.
So this appears to be a gratuitous user interface addition.
Why do we need a new user interface for this?
Eric
next prev parent reply other threads:[~2007-07-12 15:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070711210159.GF24114@agk.fab.redhat.com>
2007-07-11 21:34 ` [2.6.23 PATCH 14/18] dm: netlink add to core Andrew Morton
2007-07-12 0:40 ` Mike Anderson
2007-07-12 23:13 ` Johannes Berg
2007-07-12 15:07 ` Eric W. Biederman [this message]
2007-07-12 17:34 ` Mike Anderson
2007-07-12 19:37 ` Eric W. Biederman
2007-07-12 21:18 ` Alasdair G Kergon
2007-07-12 23:41 ` Mike Anderson
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=m1bqehfyp0.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andmike@us.ibm.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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 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 NNTP newsgroup(s).