* [2.6.23 PATCH 13/18] dm: netlink
@ 2007-07-11 21:01 Alasdair G Kergon
2007-07-11 21:27 ` Andrew Morton
0 siblings, 1 reply; 13+ messages in thread
From: Alasdair G Kergon @ 2007-07-11 21:01 UTC (permalink / raw)
To: Andrew Morton; +Cc: dm-devel, linux-kernel, Mike Anderson
From: Mike Anderson <andmike@us.ibm.com>
This patch adds a dm-netlink skeleton support to the Makefile, and the dm
directory.
Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
---
drivers/md/Kconfig | 5 ++
drivers/md/Makefile | 4 +
drivers/md/dm-netlink.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++
drivers/md/dm-netlink.h | 50 +++++++++++++++++++++++
drivers/md/dm.c | 3 +
include/linux/netlink.h | 2
6 files changed, 166 insertions(+), 1 deletion(-)
Index: linux/drivers/md/Kconfig
===================================================================
--- linux.orig/drivers/md/Kconfig 2007-07-11 21:37:31.000000000 +0100
+++ linux/drivers/md/Kconfig 2007-07-11 21:37:50.000000000 +0100
@@ -271,6 +271,11 @@ config DM_DELAY
If unsure, say N.
+config DM_NETLINK
+ bool "DM netlink events (EXPERIMENTAL)"
+ depends on BLK_DEV_DM && EXPERIMENTAL
+ ---help---
+ Generate netlink events for DM events.
endmenu
endif
Index: linux/drivers/md/Makefile
===================================================================
--- linux.orig/drivers/md/Makefile 2007-07-11 21:37:31.000000000 +0100
+++ linux/drivers/md/Makefile 2007-07-11 21:37:50.000000000 +0100
@@ -46,6 +46,10 @@ ifeq ($(CONFIG_ALTIVEC),y)
altivec_flags := -maltivec -mabi=altivec
endif
+ifeq ($(CONFIG_DM_NETLINK),y)
+dm-mod-objs += dm-netlink.o
+endif
+
targets += raid6int1.c
$(obj)/raid6int1.c: UNROLL := 1
$(obj)/raid6int1.c: $(src)/raid6int.uc $(src)/unroll.pl FORCE
Index: linux/drivers/md/dm-netlink.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/md/dm-netlink.c 2007-07-11 21:37:50.000000000 +0100
@@ -0,0 +1,103 @@
+/*
+ * Device Mapper Netlink Support (dm-netlink)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright IBM Corporation, 2005, 2006
+ * Author: Mike Anderson <andmike@us.ibm.com>
+ */
+#include <linux/module.h>
+#include <linux/mempool.h>
+#include <linux/time.h>
+#include <linux/jiffies.h>
+#include <linux/security.h>
+#include <net/sock.h>
+#include <net/netlink.h>
+
+#include "dm.h"
+#include "dm-netlink.h"
+
+#define DM_MSG_PREFIX "netlink"
+
+#define DM_EVENT_SKB_SIZE NLMSG_GOODSIZE
+
+struct dm_event_cache {
+ struct kmem_cache *cache;
+ unsigned skb_size;
+};
+
+static struct dm_event_cache _dme_cache;
+
+static int dme_cache_init(struct dm_event_cache *dc, unsigned skb_size)
+{
+ dc->skb_size = skb_size;
+
+ dc->cache = KMEM_CACHE(dm_event, 0);
+ if (!dc->cache)
+ return -ENOMEM;
+
+ return 0;
+}
+
+static void dme_cache_destroy(struct dm_event_cache *dc)
+{
+ kmem_cache_destroy(dc->cache);
+}
+
+static void dme_cache_event_put(struct dm_event *evt)
+{
+ struct dm_event_cache *dc = evt->cdata;
+
+ kmem_cache_free(dc->cache, evt);
+}
+
+static struct dm_event *dme_cache_event_get(struct dm_event_cache *dc,
+ struct mapped_device *md)
+{
+ struct dm_event *evt;
+
+ evt = kmem_cache_alloc(dc->cache, GFP_ATOMIC);
+ if (!evt)
+ return NULL;
+
+ INIT_LIST_HEAD(&evt->elist);
+ evt->cdata = dc;
+ evt->md = md;
+ evt->skb = alloc_skb(dc->skb_size, GFP_ATOMIC);
+ if (!evt->skb)
+ goto cache_err;
+
+ return evt;
+
+cache_err:
+ dme_cache_event_put(evt);
+ return NULL;
+}
+
+int __init dm_netlink_init(void)
+{
+ int r;
+
+ r = dme_cache_init(&_dme_cache, DM_EVENT_SKB_SIZE);
+ if (!r)
+ DMINFO("version 1.0.0 loaded");
+
+ return r;
+}
+
+void dm_netlink_exit(void)
+{
+ dme_cache_destroy(&_dme_cache);
+}
Index: linux/drivers/md/dm-netlink.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ linux/drivers/md/dm-netlink.h 2007-07-11 21:37:50.000000000 +0100
@@ -0,0 +1,50 @@
+/*
+ * Device Mapper Netlink Support
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright IBM Corporation, 2005, 2006
+ * Author: Mike Anderson <andmike@us.ibm.com>
+ */
+#ifndef DM_NETLINK_H
+#define DM_NETLINK_H
+
+struct dm_event_cache;
+struct mapped_device;
+struct dm_event {
+ struct dm_event_cache *cdata;
+ struct mapped_device *md;
+ struct sk_buff *skb;
+ struct list_head elist;
+};
+
+#ifdef CONFIG_DM_NETLINK
+
+int dm_netlink_init(void);
+void dm_netlink_exit(void);
+
+#else /* CONFIG_DM_NETLINK */
+
+static inline int __init dm_netlink_init(void)
+{
+ return 0;
+}
+static inline void dm_netlink_exit(void)
+{
+}
+
+#endif /* CONFIG_DM_NETLINK */
+
+#endif /* DM_NETLINK_H */
Index: linux/drivers/md/dm.c
===================================================================
--- linux.orig/drivers/md/dm.c 2007-07-11 21:37:47.000000000 +0100
+++ linux/drivers/md/dm.c 2007-07-11 21:37:50.000000000 +0100
@@ -7,6 +7,7 @@
#include "dm.h"
#include "dm-bio-list.h"
+#include "dm-netlink.h"
#include <linux/init.h>
#include <linux/module.h>
@@ -176,6 +177,7 @@ int (*_inits[])(void) __initdata = {
dm_linear_init,
dm_stripe_init,
dm_interface_init,
+ dm_netlink_init,
};
void (*_exits[])(void) = {
@@ -184,6 +186,7 @@ void (*_exits[])(void) = {
dm_linear_exit,
dm_stripe_exit,
dm_interface_exit,
+ dm_netlink_exit,
};
static int __init dm_init(void)
Index: linux/include/linux/netlink.h
===================================================================
--- linux.orig/include/linux/netlink.h 2007-07-11 21:37:31.000000000 +0100
+++ linux/include/linux/netlink.h 2007-07-11 21:37:50.000000000 +0100
@@ -21,7 +21,7 @@
#define NETLINK_DNRTMSG 14 /* DECnet routing messages */
#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
#define NETLINK_GENERIC 16
-/* leave room for NETLINK_DM (DM Events) */
+#define NETLINK_DM 17 /* Device Mapper */
#define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
#define NETLINK_ECRYPTFS 19
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-11 21:01 [2.6.23 PATCH 13/18] dm: netlink Alasdair G Kergon
@ 2007-07-11 21:27 ` Andrew Morton
2007-07-11 23:37 ` Mike Anderson
2007-07-12 23:19 ` Matt Mackall
0 siblings, 2 replies; 13+ messages in thread
From: Andrew Morton @ 2007-07-11 21:27 UTC (permalink / raw)
To: Alasdair G Kergon; +Cc: dm-devel, linux-kernel, Mike Anderson, netdev
On Wed, 11 Jul 2007 22:01:37 +0100
Alasdair G Kergon <agk@redhat.com> wrote:
> From: Mike Anderson <andmike@us.ibm.com>
>
> This patch adds a dm-netlink skeleton support to the Makefile, and the dm
> directory.
>
> ...
>
> +config DM_NETLINK
> + bool "DM netlink events (EXPERIMENTAL)"
> + depends on BLK_DEV_DM && EXPERIMENTAL
> + ---help---
> + Generate netlink events for DM events.
Need a dependency on NET there?
> ...
>
> +#ifdef CONFIG_DM_NETLINK
> +
> +int dm_netlink_init(void);
> +void dm_netlink_exit(void);
> +
> +#else /* CONFIG_DM_NETLINK */
> +
> +static inline int __init dm_netlink_init(void)
The __init here isn't needed (doesn't make sense, is missing the required
#include anyway)
> +{
> + return 0;
> +}
> +static inline void dm_netlink_exit(void)
> +{
> +}
> +
> +#endif /* CONFIG_DM_NETLINK */
> +
> +#endif /* DM_NETLINK_H */
> Index: linux/drivers/md/dm.c
> ===================================================================
> --- linux.orig/drivers/md/dm.c 2007-07-11 21:37:47.000000000 +0100
> +++ linux/drivers/md/dm.c 2007-07-11 21:37:50.000000000 +0100
> @@ -7,6 +7,7 @@
>
> #include "dm.h"
> #include "dm-bio-list.h"
> +#include "dm-netlink.h"
>
> #include <linux/init.h>
> #include <linux/module.h>
> @@ -176,6 +177,7 @@ int (*_inits[])(void) __initdata = {
> dm_linear_init,
> dm_stripe_init,
> dm_interface_init,
> + dm_netlink_init,
> };
>
> void (*_exits[])(void) = {
> @@ -184,6 +186,7 @@ void (*_exits[])(void) = {
> dm_linear_exit,
> dm_stripe_exit,
> dm_interface_exit,
> + dm_netlink_exit,
> };
hm, so if CONFIG_DM_NETLINK=n we end up taking the address of an inlined
function. So the __init above _did_ make sense, in a peculiar way. I
don't know that gcc will actually put that converted-to-non-inline function
into the desired section though.
There's no way in which those inlined functions will ever get inlined.
Perhaps all this would be better if there was no implementation of
dm_netlink_init() and dm_netlink_exit() if CONFIG_DM_NETLINK=n and you just
whack the requisite ifdefs into these tables here?
> static int __init dm_init(void)
> Index: linux/include/linux/netlink.h
> ===================================================================
> --- linux.orig/include/linux/netlink.h 2007-07-11 21:37:31.000000000 +0100
> +++ linux/include/linux/netlink.h 2007-07-11 21:37:50.000000000 +0100
> @@ -21,7 +21,7 @@
> #define NETLINK_DNRTMSG 14 /* DECnet routing messages */
> #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
> #define NETLINK_GENERIC 16
> -/* leave room for NETLINK_DM (DM Events) */
> +#define NETLINK_DM 17 /* Device Mapper */
> #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
> #define NETLINK_ECRYPTFS 19
Have the net guys checked this?
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-11 21:27 ` Andrew Morton
@ 2007-07-11 23:37 ` Mike Anderson
2007-07-12 8:10 ` Evgeniy Polyakov
2007-07-12 23:19 ` Matt Mackall
1 sibling, 1 reply; 13+ messages in thread
From: Mike Anderson @ 2007-07-11 23:37 UTC (permalink / raw)
To: Andrew Morton; +Cc: Alasdair G Kergon, dm-devel, linux-kernel, netdev
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 11 Jul 2007 22:01:37 +0100
> Alasdair G Kergon <agk@redhat.com> wrote:
>
> > From: Mike Anderson <andmike@us.ibm.com>
> >
> > This patch adds a dm-netlink skeleton support to the Makefile, and the dm
> > directory.
> >
> > ...
> >
> > +config DM_NETLINK
> > + bool "DM netlink events (EXPERIMENTAL)"
> > + depends on BLK_DEV_DM && EXPERIMENTAL
> > + ---help---
> > + Generate netlink events for DM events.
>
> Need a dependency on NET there?
>
Yes.
> > ...
> >
> > +#ifdef CONFIG_DM_NETLINK
> > +
> > +int dm_netlink_init(void);
> > +void dm_netlink_exit(void);
> > +
> > +#else /* CONFIG_DM_NETLINK */
> > +
> > +static inline int __init dm_netlink_init(void)
>
> The __init here isn't needed (doesn't make sense, is missing the required
> #include anyway)
>
> > +{
> > + return 0;
> > +}
> > +static inline void dm_netlink_exit(void)
> > +{
> > +}
> > +
> > +#endif /* CONFIG_DM_NETLINK */
> > +
> > +#endif /* DM_NETLINK_H */
> > Index: linux/drivers/md/dm.c
> > ===================================================================
> > --- linux.orig/drivers/md/dm.c 2007-07-11 21:37:47.000000000 +0100
> > +++ linux/drivers/md/dm.c 2007-07-11 21:37:50.000000000 +0100
> > @@ -7,6 +7,7 @@
> >
> > #include "dm.h"
> > #include "dm-bio-list.h"
> > +#include "dm-netlink.h"
> >
> > #include <linux/init.h>
> > #include <linux/module.h>
> > @@ -176,6 +177,7 @@ int (*_inits[])(void) __initdata = {
> > dm_linear_init,
> > dm_stripe_init,
> > dm_interface_init,
> > + dm_netlink_init,
> > };
> >
> > void (*_exits[])(void) = {
> > @@ -184,6 +186,7 @@ void (*_exits[])(void) = {
> > dm_linear_exit,
> > dm_stripe_exit,
> > dm_interface_exit,
> > + dm_netlink_exit,
> > };
>
> hm, so if CONFIG_DM_NETLINK=n we end up taking the address of an inlined
> function. So the __init above _did_ make sense, in a peculiar way. I
> don't know that gcc will actually put that converted-to-non-inline function
> into the desired section though.
>
> There's no way in which those inlined functions will ever get inlined.
> Perhaps all this would be better if there was no implementation of
> dm_netlink_init() and dm_netlink_exit() if CONFIG_DM_NETLINK=n and you just
> whack the requisite ifdefs into these tables here?
>
ok, I will switch to the ifdef CONFIG_DM_NETLINK in the tables.
> > static int __init dm_init(void)
> > Index: linux/include/linux/netlink.h
> > ===================================================================
> > --- linux.orig/include/linux/netlink.h 2007-07-11 21:37:31.000000000 +0100
> > +++ linux/include/linux/netlink.h 2007-07-11 21:37:50.000000000 +0100
> > @@ -21,7 +21,7 @@
> > #define NETLINK_DNRTMSG 14 /* DECnet routing messages */
> > #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
> > #define NETLINK_GENERIC 16
> > -/* leave room for NETLINK_DM (DM Events) */
> > +#define NETLINK_DM 17 /* Device Mapper */
> > #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
> > #define NETLINK_ECRYPTFS 19
>
> Have the net guys checked this?
No. The support is a derivative of the netlink support in
scsi_transport_iscsi.c.
-andmike
--
Michael Anderson
andmike@us.ibm.com
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-11 23:37 ` Mike Anderson
@ 2007-07-12 8:10 ` Evgeniy Polyakov
2007-07-12 10:27 ` David Miller
0 siblings, 1 reply; 13+ messages in thread
From: Evgeniy Polyakov @ 2007-07-12 8:10 UTC (permalink / raw)
To: Mike Anderson
Cc: Andrew Morton, Alasdair G Kergon, dm-devel, linux-kernel, netdev
On Wed, Jul 11, 2007 at 04:37:36PM -0700, Mike Anderson (andmike@us.ibm.com) wrote:
> > > --- linux.orig/include/linux/netlink.h 2007-07-11 21:37:31.000000000 +0100
> > > +++ linux/include/linux/netlink.h 2007-07-11 21:37:50.000000000 +0100
> > > @@ -21,7 +21,7 @@
> > > #define NETLINK_DNRTMSG 14 /* DECnet routing messages */
> > > #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
> > > #define NETLINK_GENERIC 16
> > > -/* leave room for NETLINK_DM (DM Events) */
> > > +#define NETLINK_DM 17 /* Device Mapper */
> > > #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
> > > #define NETLINK_ECRYPTFS 19
> >
> > Have the net guys checked this?
>
> No. The support is a derivative of the netlink support in
> scsi_transport_iscsi.c.
I'm not sure about all net guys, but the first question rised after
reading this - why do you want special netlink family and do not want to
use interfaces created on top of - like connector and genetlink?
> -andmike
--
Evgeniy Polyakov
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-12 8:10 ` Evgeniy Polyakov
@ 2007-07-12 10:27 ` David Miller
2007-07-12 13:42 ` Mike Anderson
0 siblings, 1 reply; 13+ messages in thread
From: David Miller @ 2007-07-12 10:27 UTC (permalink / raw)
To: johnpol; +Cc: andmike, akpm, agk, dm-devel, linux-kernel, netdev
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Date: Thu, 12 Jul 2007 12:10:29 +0400
> On Wed, Jul 11, 2007 at 04:37:36PM -0700, Mike Anderson (andmike@us.ibm.com) wrote:
> > > > --- linux.orig/include/linux/netlink.h 2007-07-11 21:37:31.000000000 +0100
> > > > +++ linux/include/linux/netlink.h 2007-07-11 21:37:50.000000000 +0100
> > > > @@ -21,7 +21,7 @@
> > > > #define NETLINK_DNRTMSG 14 /* DECnet routing messages */
> > > > #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
> > > > #define NETLINK_GENERIC 16
> > > > -/* leave room for NETLINK_DM (DM Events) */
> > > > +#define NETLINK_DM 17 /* Device Mapper */
> > > > #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
> > > > #define NETLINK_ECRYPTFS 19
> > >
> > > Have the net guys checked this?
> >
> > No. The support is a derivative of the netlink support in
> > scsi_transport_iscsi.c.
>
> I'm not sure about all net guys, but the first question rised after
> reading this - why do you want special netlink family and do not want to
> use interfaces created on top of - like connector and genetlink?
I agree, there is really no reason to not at least use
genetlink.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-12 10:27 ` David Miller
@ 2007-07-12 13:42 ` Mike Anderson
0 siblings, 0 replies; 13+ messages in thread
From: Mike Anderson @ 2007-07-12 13:42 UTC (permalink / raw)
To: David Miller; +Cc: johnpol, akpm, agk, dm-devel, linux-kernel, netdev
David Miller <davem@davemloft.net> wrote:
> From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
> Date: Thu, 12 Jul 2007 12:10:29 +0400
>
> > On Wed, Jul 11, 2007 at 04:37:36PM -0700, Mike Anderson (andmike@us.ibm.com) wrote:
> > > > > --- linux.orig/include/linux/netlink.h 2007-07-11 21:37:31.000000000 +0100
> > > > > +++ linux/include/linux/netlink.h 2007-07-11 21:37:50.000000000 +0100
> > > > > @@ -21,7 +21,7 @@
> > > > > #define NETLINK_DNRTMSG 14 /* DECnet routing messages */
> > > > > #define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */
> > > > > #define NETLINK_GENERIC 16
> > > > > -/* leave room for NETLINK_DM (DM Events) */
> > > > > +#define NETLINK_DM 17 /* Device Mapper */
> > > > > #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
> > > > > #define NETLINK_ECRYPTFS 19
> > > >
> > > > Have the net guys checked this?
> > >
> > > No. The support is a derivative of the netlink support in
> > > scsi_transport_iscsi.c.
> >
> > I'm not sure about all net guys, but the first question rised after
> > reading this - why do you want special netlink family and do not want to
> > use interfaces created on top of - like connector and genetlink?
>
> I agree, there is really no reason to not at least use
> genetlink.
ok, I will switch over to using genetlink.
-andmike
--
Michael Anderson
andmike@us.ibm.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-11 21:27 ` Andrew Morton
2007-07-11 23:37 ` Mike Anderson
@ 2007-07-12 23:19 ` Matt Mackall
2007-07-12 23:31 ` Andrew Morton
2007-07-12 23:45 ` Mike Anderson
1 sibling, 2 replies; 13+ messages in thread
From: Matt Mackall @ 2007-07-12 23:19 UTC (permalink / raw)
To: Andrew Morton
Cc: Alasdair G Kergon, dm-devel, linux-kernel, Mike Anderson, netdev
On Wed, Jul 11, 2007 at 02:27:12PM -0700, Andrew Morton wrote:
> On Wed, 11 Jul 2007 22:01:37 +0100
> Alasdair G Kergon <agk@redhat.com> wrote:
>
> > From: Mike Anderson <andmike@us.ibm.com>
> >
> > This patch adds a dm-netlink skeleton support to the Makefile, and the dm
> > directory.
> >
> > ...
> >
> > +config DM_NETLINK
> > + bool "DM netlink events (EXPERIMENTAL)"
> > + depends on BLK_DEV_DM && EXPERIMENTAL
> > + ---help---
> > + Generate netlink events for DM events.
>
> Need a dependency on NET there?
It's really sad to make DM dependent on the network layer.
--
Mathematics is the supreme nostalgia of our time.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-12 23:19 ` Matt Mackall
@ 2007-07-12 23:31 ` Andrew Morton
2007-07-13 2:00 ` [dm-devel] " Mike Anderson
2007-07-13 7:03 ` Evgeniy Polyakov
2007-07-12 23:45 ` Mike Anderson
1 sibling, 2 replies; 13+ messages in thread
From: Andrew Morton @ 2007-07-12 23:31 UTC (permalink / raw)
To: Matt Mackall
Cc: Alasdair G Kergon, dm-devel, linux-kernel, Mike Anderson, netdev
On Thu, 12 Jul 2007 18:19:20 -0500
Matt Mackall <mpm@selenic.com> wrote:
> On Wed, Jul 11, 2007 at 02:27:12PM -0700, Andrew Morton wrote:
> > On Wed, 11 Jul 2007 22:01:37 +0100
> > Alasdair G Kergon <agk@redhat.com> wrote:
> >
> > > From: Mike Anderson <andmike@us.ibm.com>
> > >
> > > This patch adds a dm-netlink skeleton support to the Makefile, and the dm
> > > directory.
> > >
> > > ...
> > >
> > > +config DM_NETLINK
> > > + bool "DM netlink events (EXPERIMENTAL)"
> > > + depends on BLK_DEV_DM && EXPERIMENTAL
> > > + ---help---
> > > + Generate netlink events for DM events.
> >
> > Need a dependency on NET there?
>
> It's really sad to make DM dependent on the network layer.
>
Yes, it would be somewhat sad. However one can presumably continue to use
DM, just without "DM netlink events".
But that probably means that one will not be able to use the standard DM
admin tools without networking. Maybe there will remain alternative but
cruder ways to get things done?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dm-devel] Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-12 23:31 ` Andrew Morton
@ 2007-07-13 2:00 ` Mike Anderson
2007-07-13 20:12 ` Valdis.Kletnieks
2007-07-13 7:03 ` Evgeniy Polyakov
1 sibling, 1 reply; 13+ messages in thread
From: Mike Anderson @ 2007-07-13 2:00 UTC (permalink / raw)
To: device-mapper development
Cc: Matt Mackall, netdev, linux-kernel, Alasdair G Kergon
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Thu, 12 Jul 2007 18:19:20 -0500
> Matt Mackall <mpm@selenic.com> wrote:
>
> > On Wed, Jul 11, 2007 at 02:27:12PM -0700, Andrew Morton wrote:
> > > On Wed, 11 Jul 2007 22:01:37 +0100
> > > Alasdair G Kergon <agk@redhat.com> wrote:
> > >
> > > > From: Mike Anderson <andmike@us.ibm.com>
> > > >
> > > > This patch adds a dm-netlink skeleton support to the Makefile, and the dm
> > > > directory.
> > > >
> > > > ...
> > > >
> > > > +config DM_NETLINK
> > > > + bool "DM netlink events (EXPERIMENTAL)"
> > > > + depends on BLK_DEV_DM && EXPERIMENTAL
> > > > + ---help---
> > > > + Generate netlink events for DM events.
> > >
> > > Need a dependency on NET there?
> >
> > It's really sad to make DM dependent on the network layer.
> >
>
> Yes, it would be somewhat sad. However one can presumably continue to use
> DM, just without "DM netlink events".
>
Yes, if you deselect you just do not receive the events through netlink.
> But that probably means that one will not be able to use the standard DM
> admin tools without networking. Maybe there will remain alternative but
> cruder ways to get things done?
No, all admin tools and interfaces function as they do today. The
dm-netlink patch series only contains 9 deletions (actual just one true
deletion of existing kernel code the others are due to break up of the
patch into compilable chunks). The intent was not to break users or force
migration.
-andmike
--
Michael Anderson
andmike@us.ibm.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dm-devel] Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-13 2:00 ` [dm-devel] " Mike Anderson
@ 2007-07-13 20:12 ` Valdis.Kletnieks
0 siblings, 0 replies; 13+ messages in thread
From: Valdis.Kletnieks @ 2007-07-13 20:12 UTC (permalink / raw)
To: Mike Anderson
Cc: device-mapper development, Matt Mackall, netdev, linux-kernel,
Alasdair G Kergon
[-- Attachment #1: Type: text/plain, Size: 540 bytes --]
On Thu, 12 Jul 2007 19:00:59 PDT, Mike Anderson said:
> No, all admin tools and interfaces function as they do today. The
> dm-netlink patch series only contains 9 deletions (actual just one true
> deletion of existing kernel code the others are due to break up of the
> patch into compilable chunks). The intent was not to break users or force
> migration.
OK, I'll bite - if the admin tools function as before, who is *using* the
code? Or do the admin tools have a preferred netlink component and a fallback
set of code if that fails?
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-12 23:31 ` Andrew Morton
2007-07-13 2:00 ` [dm-devel] " Mike Anderson
@ 2007-07-13 7:03 ` Evgeniy Polyakov
2007-07-13 7:16 ` Kay Sievers
1 sibling, 1 reply; 13+ messages in thread
From: Evgeniy Polyakov @ 2007-07-13 7:03 UTC (permalink / raw)
To: Andrew Morton
Cc: Matt Mackall, Alasdair G Kergon, dm-devel, linux-kernel,
Mike Anderson, netdev
On Thu, Jul 12, 2007 at 04:31:15PM -0700, Andrew Morton (akpm@linux-foundation.org) wrote:
> > > Need a dependency on NET there?
> >
> > It's really sad to make DM dependent on the network layer.
> >
>
> Yes, it would be somewhat sad. However one can presumably continue to use
> DM, just without "DM netlink events".
On my machine device mapper (lvm, raid) does not work without sockets,
(maybe not dm, but hotplug, which creates nodes, or configuration)
so it already depends on it. Hotplug depends on networking.
You missed the day when everyone started to depend on networking :)
--
Evgeniy Polyakov
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-13 7:03 ` Evgeniy Polyakov
@ 2007-07-13 7:16 ` Kay Sievers
0 siblings, 0 replies; 13+ messages in thread
From: Kay Sievers @ 2007-07-13 7:16 UTC (permalink / raw)
To: Evgeniy Polyakov
Cc: Andrew Morton, Matt Mackall, Alasdair G Kergon, dm-devel,
linux-kernel, Mike Anderson, netdev
On 7/13/07, Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> On Thu, Jul 12, 2007 at 04:31:15PM -0700, Andrew Morton (akpm@linux-foundation.org) wrote:
> > > > Need a dependency on NET there?
> > >
> > > It's really sad to make DM dependent on the network layer.
> > >
> >
> > Yes, it would be somewhat sad. However one can presumably continue to use
> > DM, just without "DM netlink events".
>
> On my machine device mapper (lvm, raid) does not work without sockets,
> (maybe not dm, but hotplug, which creates nodes, or configuration)
> so it already depends on it. Hotplug depends on networking.
>
> You missed the day when everyone started to depend on networking :)
Right, uevents (udev) depend on networking. One could still use the
/sbin/hotplug fork-bomb, but boxes that don't want networking are
often that small, that the amount of events the kernel creates today,
leads immediately to OOM, because of too many event processes forked
at the same time.
Kay
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [2.6.23 PATCH 13/18] dm: netlink
2007-07-12 23:19 ` Matt Mackall
2007-07-12 23:31 ` Andrew Morton
@ 2007-07-12 23:45 ` Mike Anderson
1 sibling, 0 replies; 13+ messages in thread
From: Mike Anderson @ 2007-07-12 23:45 UTC (permalink / raw)
To: Matt Mackall
Cc: Andrew Morton, Alasdair G Kergon, dm-devel, linux-kernel, netdev
Matt Mackall <mpm@selenic.com> wrote:
> On Wed, Jul 11, 2007 at 02:27:12PM -0700, Andrew Morton wrote:
> > On Wed, 11 Jul 2007 22:01:37 +0100
> > Alasdair G Kergon <agk@redhat.com> wrote:
> >
> > > From: Mike Anderson <andmike@us.ibm.com>
> > >
> > > This patch adds a dm-netlink skeleton support to the Makefile, and the dm
> > > directory.
> > >
> > > ...
> > >
> > > +config DM_NETLINK
> > > + bool "DM netlink events (EXPERIMENTAL)"
> > > + depends on BLK_DEV_DM && EXPERIMENTAL
> > > + ---help---
> > > + Generate netlink events for DM events.
> >
> > Need a dependency on NET there?
>
> It's really sad to make DM dependent on the network layer.
It wouldn't be all of dm. Only the netlink based event interface would be
dependent.
-andmike
--
Michael Anderson
andmike@us.ibm.com
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-07-13 20:13 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 21:01 [2.6.23 PATCH 13/18] dm: netlink Alasdair G Kergon
2007-07-11 21:27 ` Andrew Morton
2007-07-11 23:37 ` Mike Anderson
2007-07-12 8:10 ` Evgeniy Polyakov
2007-07-12 10:27 ` David Miller
2007-07-12 13:42 ` Mike Anderson
2007-07-12 23:19 ` Matt Mackall
2007-07-12 23:31 ` Andrew Morton
2007-07-13 2:00 ` [dm-devel] " Mike Anderson
2007-07-13 20:12 ` Valdis.Kletnieks
2007-07-13 7:03 ` Evgeniy Polyakov
2007-07-13 7:16 ` Kay Sievers
2007-07-12 23:45 ` Mike Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox