virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [Xen-devel] [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found] <20110624215155.GB4735@wavehammer.waldi.eu.org>
@ 2011-06-27  8:45 ` Ian Campbell
  2011-06-27 16:13 ` Konrad Rzeszutek Wilk
       [not found] ` <20110627161327.GO6978@dumpdata.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Ian Campbell @ 2011-06-27  8:45 UTC (permalink / raw)
  To: Bastian Blank, Konrad Rzeszutek Wilk, Jeremy Fitzhardinge
  Cc: xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org

On Fri, 2011-06-24 at 22:51 +0100, Bastian Blank wrote:
> All the Xen backend drivers are assigned to a special bus type
> xen-backend. This allows userspace to load the modules on request.
> 
> This patch defines xen-backend:* aliases on the modules and exports this
> names through modalias and uevent.

Excellent, this was a big missing piece of functionality for distros.
Thanks!

> Signed-off-by: Bastian Blank <waldi@debian.org>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> ---
>  drivers/block/xen-blkback/blkback.c       |    1 +
>  drivers/net/xen-netback/netback.c         |    1 +
>  drivers/xen/xenbus/xenbus_probe.c         |    3 ++-
>  drivers/xen/xenbus/xenbus_probe_backend.c |    3 +++
>  4 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
> index 5cf2993..ed62008 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -824,3 +824,4 @@ static int __init xen_blkif_init(void)
>  module_init(xen_blkif_init);
>  
>  MODULE_LICENSE("Dual BSD/GPL");
> +MODULE_ALIAS("xen-backend:vbd");
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index 0e4851b..fd00f25 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -1743,3 +1743,4 @@ failed_init:
>  module_init(netback_init);
>  
>  MODULE_LICENSE("Dual BSD/GPL");
> +MODULE_ALIAS("xen-backend:vif");
> diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
> index 2ed0b04..bd2f90c 100644
> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -393,7 +393,8 @@ static ssize_t devtype_show(struct device *dev,
>  static ssize_t modalias_show(struct device *dev,
>  			     struct device_attribute *attr, char *buf)
>  {
> -	return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
> +	return sprintf(buf, "%s:%s\n", dev->bus->name,
> +		       to_xenbus_device(dev)->devicetype);
>  }
>  
>  struct device_attribute xenbus_dev_attrs[] = {
> diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c
> index ec510e5..60adf91 100644
> --- a/drivers/xen/xenbus/xenbus_probe_backend.c
> +++ b/drivers/xen/xenbus/xenbus_probe_backend.c
> @@ -107,6 +107,9 @@ static int xenbus_uevent_backend(struct device *dev,
>  	if (xdev == NULL)
>  		return -ENODEV;
>  
> +	if (add_uevent_var(env, "MODALIAS=xen-backend:%s", xdev->devicetype))
> +		return -ENOMEM;
> +
>  	/* stuff we want to pass to /sbin/hotplug */
>  	if (add_uevent_var(env, "XENBUS_TYPE=%s", xdev->devicetype))
>  		return -ENOMEM;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found] <20110624215155.GB4735@wavehammer.waldi.eu.org>
  2011-06-27  8:45 ` [Xen-devel] [PATCH 2/2] xen: Add alias to autoload backend drivers Ian Campbell
@ 2011-06-27 16:13 ` Konrad Rzeszutek Wilk
       [not found] ` <20110627161327.GO6978@dumpdata.com>
  2 siblings, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-06-27 16:13 UTC (permalink / raw)
  To: Bastian Blank, xen-devel, virtualization, linux-kernel

On Fri, Jun 24, 2011 at 11:51:55PM +0200, Bastian Blank wrote:
> All the Xen backend drivers are assigned to a special bus type
> xen-backend. This allows userspace to load the modules on request.

Is there a specific version of udev that would take advantage of this?

> 
> This patch defines xen-backend:* aliases on the modules and exports this
> names through modalias and uevent.
> 
> Signed-off-by: Bastian Blank <waldi@debian.org>
> ---
>  drivers/block/xen-blkback/blkback.c       |    1 +
>  drivers/net/xen-netback/netback.c         |    1 +
>  drivers/xen/xenbus/xenbus_probe.c         |    3 ++-
>  drivers/xen/xenbus/xenbus_probe_backend.c |    3 +++
>  4 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
> index 5cf2993..ed62008 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -824,3 +824,4 @@ static int __init xen_blkif_init(void)
>  module_init(xen_blkif_init);
>  
>  MODULE_LICENSE("Dual BSD/GPL");
> +MODULE_ALIAS("xen-backend:vbd");
> diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
> index 0e4851b..fd00f25 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -1743,3 +1743,4 @@ failed_init:
>  module_init(netback_init);
>  
>  MODULE_LICENSE("Dual BSD/GPL");
> +MODULE_ALIAS("xen-backend:vif");
> diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
> index 2ed0b04..bd2f90c 100644
> --- a/drivers/xen/xenbus/xenbus_probe.c
> +++ b/drivers/xen/xenbus/xenbus_probe.c
> @@ -393,7 +393,8 @@ static ssize_t devtype_show(struct device *dev,
>  static ssize_t modalias_show(struct device *dev,
>  			     struct device_attribute *attr, char *buf)
>  {
> -	return sprintf(buf, "xen:%s\n", to_xenbus_device(dev)->devicetype);
> +	return sprintf(buf, "%s:%s\n", dev->bus->name,
> +		       to_xenbus_device(dev)->devicetype);
>  }
>  
>  struct device_attribute xenbus_dev_attrs[] = {
> diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c
> index ec510e5..60adf91 100644
> --- a/drivers/xen/xenbus/xenbus_probe_backend.c
> +++ b/drivers/xen/xenbus/xenbus_probe_backend.c
> @@ -107,6 +107,9 @@ static int xenbus_uevent_backend(struct device *dev,
>  	if (xdev == NULL)
>  		return -ENODEV;
>  
> +	if (add_uevent_var(env, "MODALIAS=xen-backend:%s", xdev->devicetype))
> +		return -ENOMEM;
> +
>  	/* stuff we want to pass to /sbin/hotplug */
>  	if (add_uevent_var(env, "XENBUS_TYPE=%s", xdev->devicetype))
>  		return -ENOMEM;
> -- 
> 1.7.5.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found] ` <20110627161327.GO6978@dumpdata.com>
@ 2011-06-27 16:37   ` Bastian Blank
       [not found]   ` <20110627163728.GA23028@wavehammer.waldi.eu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Bastian Blank @ 2011-06-27 16:37 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel, linux-kernel, virtualization

On Mon, Jun 27, 2011 at 12:13:27PM -0400, Konrad Rzeszutek Wilk wrote:
> On Fri, Jun 24, 2011 at 11:51:55PM +0200, Bastian Blank wrote:
> > All the Xen backend drivers are assigned to a special bus type
> > xen-backend. This allows userspace to load the modules on request.
> Is there a specific version of udev that would take advantage of this?

Was there a version within the last three years that can't? The patch is
tested and udev does its work.

Bastian

-- 
Pain is a thing of the mind.  The mind can be controlled.
		-- Spock, "Operation -- Annihilate!" stardate 3287.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] Re: [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found]   ` <20110627163728.GA23028@wavehammer.waldi.eu.org>
@ 2011-06-27 16:51     ` Konrad Rzeszutek Wilk
       [not found]     ` <20110627165109.GB13335@dumpdata.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-06-27 16:51 UTC (permalink / raw)
  To: Bastian Blank, xen-devel, virtualization, linux-kernel

On Mon, Jun 27, 2011 at 06:37:29PM +0200, Bastian Blank wrote:
> On Mon, Jun 27, 2011 at 12:13:27PM -0400, Konrad Rzeszutek Wilk wrote:
> > On Fri, Jun 24, 2011 at 11:51:55PM +0200, Bastian Blank wrote:
> > > All the Xen backend drivers are assigned to a special bus type
> > > xen-backend. This allows userspace to load the modules on request.
> > Is there a specific version of udev that would take advantage of this?
> 
> Was there a version within the last three years that can't? The patch is
> tested and udev does its work.

Ok, that answers that question. Queue up for 3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] Re: [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found]     ` <20110627165109.GB13335@dumpdata.com>
@ 2011-06-27 16:57       ` Konrad Rzeszutek Wilk
       [not found]       ` <20110627165711.GA2201@dumpdata.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-06-27 16:57 UTC (permalink / raw)
  To: Bastian Blank, xen-devel, virtualization, linux-kernel

On Mon, Jun 27, 2011 at 12:51:09PM -0400, Konrad Rzeszutek Wilk wrote:
> On Mon, Jun 27, 2011 at 06:37:29PM +0200, Bastian Blank wrote:
> > On Mon, Jun 27, 2011 at 12:13:27PM -0400, Konrad Rzeszutek Wilk wrote:
> > > On Fri, Jun 24, 2011 at 11:51:55PM +0200, Bastian Blank wrote:
> > > > All the Xen backend drivers are assigned to a special bus type
> > > > xen-backend. This allows userspace to load the modules on request.
> > > Is there a specific version of udev that would take advantage of this?
> > 
> > Was there a version within the last three years that can't? The patch is
> > tested and udev does its work.
> 
> Ok, that answers that question. Queue up for 3.1

Ugh actually no I can't.

Bastian,

Can you re-submit these two patches (and stick on Acked-by Ian on them) and
split the "xen: Add alias to autoload backend driver" in three patches:
 1) the xen-netback (and copy David Miller)
 2) the xen-blkback (and copy Jens Axboe)
 3) the xenbus one

and add Acked-by on the two backends from me and from Ian?

That should be five patches total.

I will take the xenbus patches and have them in a 3.1 branch and the
backends patches will go to the appropiate maintainer.

Thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] Re: [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found]       ` <20110627165711.GA2201@dumpdata.com>
@ 2011-06-27 17:23         ` Bastian Blank
       [not found]         ` <20110627172305.GC23028@wavehammer.waldi.eu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Bastian Blank @ 2011-06-27 17:23 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel, linux-kernel, virtualization

On Mon, Jun 27, 2011 at 12:57:11PM -0400, Konrad Rzeszutek Wilk wrote:
> Ugh actually no I can't.

Why? It does not actually change things.

> Can you re-submit these two patches (and stick on Acked-by Ian on them) and
> split the "xen: Add alias to autoload backend driver" in three patches:
>  1) the xen-netback (and copy David Miller)
>  2) the xen-blkback (and copy Jens Axboe)
>  3) the xenbus one

That is silly.

> That should be five patches total.

No, 2+2 is 4, not five.

Bastian

-- 
Each kiss is as the first.
		-- Miramanee, Kirk's wife, "The Paradise Syndrome",
		   stardate 4842.6

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] Re: [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found]         ` <20110627172305.GC23028@wavehammer.waldi.eu.org>
@ 2011-06-27 17:34           ` Konrad Rzeszutek Wilk
       [not found]           ` <20110627173447.GD2430@dumpdata.com>
  1 sibling, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-06-27 17:34 UTC (permalink / raw)
  To: Bastian Blank, xen-devel, virtualization, linux-kernel

On Mon, Jun 27, 2011 at 07:23:05PM +0200, Bastian Blank wrote:
> On Mon, Jun 27, 2011 at 12:57:11PM -0400, Konrad Rzeszutek Wilk wrote:
> > Ugh actually no I can't.
> 
> Why? It does not actually change things.
> 
> > Can you re-submit these two patches (and stick on Acked-by Ian on them) and
> > split the "xen: Add alias to autoload backend driver" in three patches:
> >  1) the xen-netback (and copy David Miller)
> >  2) the xen-blkback (and copy Jens Axboe)
> >  3) the xenbus one
> 
> That is silly.

Please do it.

> 
> > That should be five patches total.
> 
> No, 2+2 is 4, not five.

Right. Got my math wrong.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Xen-devel] Re: [PATCH 2/2] xen: Add alias to autoload backend drivers
       [not found]           ` <20110627173447.GD2430@dumpdata.com>
@ 2011-06-28 13:47             ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2011-06-28 13:47 UTC (permalink / raw)
  To: Bastian Blank, xen-devel, virtualization, linux-kernel

On Mon, Jun 27, 2011 at 01:34:47PM -0400, Konrad Rzeszutek Wilk wrote:
> On Mon, Jun 27, 2011 at 07:23:05PM +0200, Bastian Blank wrote:
> > On Mon, Jun 27, 2011 at 12:57:11PM -0400, Konrad Rzeszutek Wilk wrote:
> > > Ugh actually no I can't.
> > 
> > Why? It does not actually change things.

There are two ways of doing this:

1). Split the patch in three b/c:

The backends are owned by different maintainers. The xen-netback
is owned by David Miller and he is the one that will take the patch and send
it to Linus during the next merge window. The xen-blkback is the same thing -
Jens will take it (or I can stick it in my #stable/for-jens branch and ask
him to pull everything there). Either way, for both backends, those two
folks are the ones that Linus will take the patch from - not me.

I am going to take the xenbus patches and ask Linus to pull them.

In other words, this last patch crosses three different maintainers - hence
you can either split the patch in three parts.

2). Ask each of the maintainers (David, Jens) to give you an Ack so that
this patch has both of them and then I can send it directly to Linus.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-06-28 13:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20110624215155.GB4735@wavehammer.waldi.eu.org>
2011-06-27  8:45 ` [Xen-devel] [PATCH 2/2] xen: Add alias to autoload backend drivers Ian Campbell
2011-06-27 16:13 ` Konrad Rzeszutek Wilk
     [not found] ` <20110627161327.GO6978@dumpdata.com>
2011-06-27 16:37   ` Bastian Blank
     [not found]   ` <20110627163728.GA23028@wavehammer.waldi.eu.org>
2011-06-27 16:51     ` [Xen-devel] " Konrad Rzeszutek Wilk
     [not found]     ` <20110627165109.GB13335@dumpdata.com>
2011-06-27 16:57       ` Konrad Rzeszutek Wilk
     [not found]       ` <20110627165711.GA2201@dumpdata.com>
2011-06-27 17:23         ` Bastian Blank
     [not found]         ` <20110627172305.GC23028@wavehammer.waldi.eu.org>
2011-06-27 17:34           ` Konrad Rzeszutek Wilk
     [not found]           ` <20110627173447.GD2430@dumpdata.com>
2011-06-28 13:47             ` Konrad Rzeszutek Wilk

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