linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* add rules for new aoe character devices
@ 2007-11-29 17:11 Ed L. Cashin
  2007-12-03 18:15 ` Kay Sievers
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Ed L. Cashin @ 2007-11-29 17:11 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

The patch below adds support for new aoe driver character "flush" and
"revalidate" devices to the existing aoe rules in udev-117.

The current aoe driver version in the Linux kernel does not include
the "flush" feature, but I have already submitted patches to the LKML
adding that support and am now working on updating those patches for
resubmission.  Those using the aoe driver on the Coraid website
already have the "flush" feature.

-- 
  Support - http://www.coraid.com/support/howto.html
  Ed L Cashin <ecashin@coraid.com>

[-- Attachment #2: udev-117-aoe-newdevs.diff --]
[-- Type: text/x-diff, Size: 2071 bytes --]

diff -upr udev-117.orig/etc/udev/debian/devfs.rules udev-117/etc/udev/debian/devfs.rules
--- udev-117.orig/etc/udev/debian/devfs.rules	2007-11-13 14:47:34.000000000 -0500
+++ udev-117/etc/udev/debian/devfs.rules	2007-11-29 11:51:06.000000000 -0500
@@ -148,6 +148,7 @@ SUBSYSTEM=="aoe", KERNEL=="discover",	NA
 SUBSYSTEM=="aoe", KERNEL=="err",	NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="interfaces",	NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="revalidate",	NAME="etherd/%k"
+SUBSYSTEM=="aoe", KERNEL=="flush",     NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
 KERNEL=="device-mapper",	NAME="mapper/control"
diff -upr udev-117.orig/etc/udev/debian/udev.rules udev-117/etc/udev/debian/udev.rules
--- udev-117.orig/etc/udev/debian/udev.rules	2007-11-13 14:47:34.000000000 -0500
+++ udev-117/etc/udev/debian/udev.rules	2007-11-29 11:48:57.000000000 -0500
@@ -97,6 +97,7 @@ SUBSYSTEM=="aoe", KERNEL=="discover",	NA
 SUBSYSTEM=="aoe", KERNEL=="err",	NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="interfaces",	NAME="etherd/%k"
 SUBSYSTEM=="aoe", KERNEL=="revalidate",	NAME="etherd/%k"
+SUBSYSTEM=="aoe", KERNEL=="flush",     NAME="etherd/%k"
 
 # device mapper creates its own device nodes, so ignore these
 KERNEL=="device-mapper",	NAME="mapper/control"
diff -upr udev-117.orig/etc/udev/slackware/udev.rules udev-117/etc/udev/slackware/udev.rules
--- udev-117.orig/etc/udev/slackware/udev.rules	2007-11-13 14:47:34.000000000 -0500
+++ udev-117/etc/udev/slackware/udev.rules	2007-11-29 11:54:21.000000000 -0500
@@ -148,6 +148,8 @@ KERNEL=="md[0-9]*",	NAME="md/%n", SYMLIN
 SUBSYSTEM=="aoe", KERNEL=="discover",	NAME="etherd/%k", GROUP="disk", MODE="0220"
 SUBSYSTEM=="aoe", KERNEL=="err",	NAME="etherd/%k", GROUP="disk", MODE="0440"
 SUBSYSTEM=="aoe", KERNEL=="interfaces",	NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM=="aoe", KERNEL=="revalidate",	NAME="etherd/%k", GROUP="disk", MODE="0220"
+SUBSYSTEM=="aoe", KERNEL=="flush",	NAME="etherd/%k", GROUP="disk", MODE="0220"
 
 # netlink devices
 KERNEL=="route",	NAME="netlink/%k"

[-- Attachment #3: Type: text/plain, Size: 309 bytes --]

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4

[-- Attachment #4: Type: text/plain, Size: 226 bytes --]

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: add rules for new aoe character devices
  2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
@ 2007-12-03 18:15 ` Kay Sievers
  2007-12-03 18:38 ` Ed L. Cashin
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2007-12-03 18:15 UTC (permalink / raw)
  To: linux-hotplug

On Nov 29, 2007 6:11 PM, Ed L. Cashin <ecashin@coraid.com> wrote:
> The patch below adds support for new aoe driver character "flush" and
> "revalidate" devices to the existing aoe rules in udev-117.
>
> The current aoe driver version in the Linux kernel does not include
> the "flush" feature, but I have already submitted patches to the LKML
> adding that support and am now working on updating those patches for
> resubmission.  Those using the aoe driver on the Coraid website
> already have the "flush" feature.

The distro rules are just a copy from the distro packages and changes made
here will not get into the packages. We can add the rules only to the "default"
rules.

Does this rule work for you? It should move all nodes into a subdir:
  SUBSYSTEM="aoe",              NAME="etherd/%k"

Kay

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: add rules for new aoe character devices
  2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
  2007-12-03 18:15 ` Kay Sievers
@ 2007-12-03 18:38 ` Ed L. Cashin
  2007-12-03 18:42 ` Kay Sievers
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Ed L. Cashin @ 2007-12-03 18:38 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Dec 03, 2007 at 07:15:03PM +0100, Kay Sievers wrote:
> On Nov 29, 2007 6:11 PM, Ed L. Cashin <ecashin@coraid.com> wrote:
> > The patch below adds support for new aoe driver character "flush" and
> > "revalidate" devices to the existing aoe rules in udev-117.
> >
> > The current aoe driver version in the Linux kernel does not include
> > the "flush" feature, but I have already submitted patches to the LKML
> > adding that support and am now working on updating those patches for
> > resubmission.  Those using the aoe driver on the Coraid website
> > already have the "flush" feature.
> 
> The distro rules are just a copy from the distro packages and changes made
> here will not get into the packages. We can add the rules only to the "default"
> rules.

Ah.  Thank you.

> Does this rule work for you? It should move all nodes into a subdir:
>   SUBSYSTEM="aoe",              NAME="etherd/%k"

Yes, that's good for the block devices.  In the past it seems that
rule doesn't guarantee the creation of the character device nodes,
though, and that is why there is a separate rule for each character
node in the patch I sent.  I haven't checked yet whether the latest
udev and kernel still behave the same way.

-- 
  Support - http://www.coraid.com/support/howto.html
  Ed L Cashin <ecashin@coraid.com>

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: add rules for new aoe character devices
  2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
  2007-12-03 18:15 ` Kay Sievers
  2007-12-03 18:38 ` Ed L. Cashin
@ 2007-12-03 18:42 ` Kay Sievers
  2007-12-03 18:52 ` Matthias Schwarzott
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2007-12-03 18:42 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 2007-12-03 at 13:38 -0500, Ed L. Cashin wrote:
> On Mon, Dec 03, 2007 at 07:15:03PM +0100, Kay Sievers wrote:
> > On Nov 29, 2007 6:11 PM, Ed L. Cashin <ecashin@coraid.com> wrote:
> > > The patch below adds support for new aoe driver character "flush" and
> > > "revalidate" devices to the existing aoe rules in udev-117.
> > >
> > > The current aoe driver version in the Linux kernel does not include
> > > the "flush" feature, but I have already submitted patches to the LKML
> > > adding that support and am now working on updating those patches for
> > > resubmission.  Those using the aoe driver on the Coraid website
> > > already have the "flush" feature.
> > 
> > The distro rules are just a copy from the distro packages and changes made
> > here will not get into the packages. We can add the rules only to the "default"
> > rules.
> 
> Ah.  Thank you.
> 
> > Does this rule work for you? It should move all nodes into a subdir:
> >   SUBSYSTEM="aoe",              NAME="etherd/%k"
> 
> Yes, that's good for the block devices.  In the past it seems that
> rule doesn't guarantee the creation of the character device nodes,
> though, and that is why there is a separate rule for each character
> node in the patch I sent.  I haven't checked yet whether the latest
> udev and kernel still behave the same way.

Block devices always have SUBSYSTEM="block", this will only handle the
char devices. You want the block devices to be in a subdir?

Kay


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: add rules for new aoe character devices
  2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
                   ` (2 preceding siblings ...)
  2007-12-03 18:42 ` Kay Sievers
@ 2007-12-03 18:52 ` Matthias Schwarzott
  2007-12-10 15:34 ` Ed L. Cashin
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Matthias Schwarzott @ 2007-12-03 18:52 UTC (permalink / raw)
  To: linux-hotplug

On Montag, 3. Dezember 2007, Kay Sievers wrote:
> On Mon, 2007-12-03 at 13:38 -0500, Ed L. Cashin wrote:
> > On Mon, Dec 03, 2007 at 07:15:03PM +0100, Kay Sievers wrote:
> > > On Nov 29, 2007 6:11 PM, Ed L. Cashin <ecashin@coraid.com> wrote:
> > > > The patch below adds support for new aoe driver character "flush" and
> > > > "revalidate" devices to the existing aoe rules in udev-117.
> > > >
> > > > The current aoe driver version in the Linux kernel does not include
> > > > the "flush" feature, but I have already submitted patches to the LKML
> > > > adding that support and am now working on updating those patches for
> > > > resubmission.  Those using the aoe driver on the Coraid website
> > > > already have the "flush" feature.
> > >
> > > The distro rules are just a copy from the distro packages and changes
> > > made here will not get into the packages. We can add the rules only to
> > > the "default" rules.
> >
> > Ah.  Thank you.
> >
> > > Does this rule work for you? It should move all nodes into a subdir:
> > >   SUBSYSTEM="aoe",              NAME="etherd/%k"
> >
> > Yes, that's good for the block devices.  In the past it seems that
> > rule doesn't guarantee the creation of the character device nodes,
> > though, and that is why there is a separate rule for each character
> > node in the patch I sent.  I haven't checked yet whether the latest
> > udev and kernel still behave the same way.
>
> Block devices always have SUBSYSTEM="block", this will only handle the
> char devices. You want the block devices to be in a subdir?
>
> Kay

The rules we had in the old gentoo rules file seems to care only about the aoe 
char-devices.
# aoe char devices,
SUBSYSTEM="aoe", KERNEL="discover",	NAME="etherd/%k", GROUP="disk", 
MODE="0220"
SUBSYSTEM="aoe", KERNEL="err",	NAME="etherd/%k", GROUP="disk", MODE="0440"
SUBSYSTEM="aoe", KERNEL="interfaces",	NAME="etherd/%k", GROUP="disk", 
MODE="0220"


So I also suggest to add something like
SUBSYSTEM="aoe", NAME="etherd/%k", GROUP="disk"

No idea if MODE is really needed like done in the old rules.
As I think: If the drivers are written properly they should only allow reading 
or writing (as needed) without setting it like above.
I suggest to add GROUP=disk as I think these control devices are similar to 
raw sg, raw and tape devices.

Matthias


-- 
Matthias Schwarzott (zzam)


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: add rules for new aoe character devices
  2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
                   ` (3 preceding siblings ...)
  2007-12-03 18:52 ` Matthias Schwarzott
@ 2007-12-10 15:34 ` Ed L. Cashin
  2007-12-10 19:21 ` Kay Sievers
  2007-12-10 20:07 ` Ed L. Cashin
  6 siblings, 0 replies; 8+ messages in thread
From: Ed L. Cashin @ 2007-12-10 15:34 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Dec 03, 2007 at 07:42:58PM +0100, Kay Sievers wrote:
> On Mon, 2007-12-03 at 13:38 -0500, Ed L. Cashin wrote:
> > On Mon, Dec 03, 2007 at 07:15:03PM +0100, Kay Sievers wrote:
...
> > > Does this rule work for you? It should move all nodes into a subdir:
> > >   SUBSYSTEM="aoe",              NAME="etherd/%k"
> > 
> > Yes, that's good for the block devices.  In the past it seems that
> > rule doesn't guarantee the creation of the character device nodes,
> > though, and that is why there is a separate rule for each character
> > node in the patch I sent.  I haven't checked yet whether the latest
> > udev and kernel still behave the same way.
> 
> Block devices always have SUBSYSTEM="block", this will only handle the
> char devices. You want the block devices to be in a subdir?

Yes, the normal arrangement is for the "etherd" subdirectory in /dev
to contain the character and block devices for the aoe driver.  It
looks like,

  ecashin@ellijay:~$ ls -l /dev/etherd 
  total 0
  c-w--w---- 1 root disk 152,  3 Dec  7 16:24 discover
  brw-rw---- 1 root disk 152, 16 Dec  7 17:02 e7.0
  brw-rw---- 1 root disk 152,  0 Dec  7 17:02 e7.1
  cr--r----- 1 root disk 152,  2 Dec  7 16:24 err
  c-w--w---- 1 root disk 152,  6 Dec  7 16:24 flush
  c-w--w---- 1 root disk 152,  4 Dec  7 16:24 interfaces
  c-w--w---- 1 root disk 152,  5 Dec  7 16:24 revalidate
  ecashin@ellijay:~$ 

(The block device minor numbers are different for this aoe6-55 driver
than they would be for earlier versions.  This aoe6-55 driver relies
on udev and assigns minor numbers dynamically.  Older drivers can't do
that, and so have a more limited range of possible AoE shelf and slot
addresses.)

-- 
  Support - http://www.coraid.com/support/howto.html
  Ed L Cashin <ecashin@coraid.com>

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: add rules for new aoe character devices
  2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
                   ` (4 preceding siblings ...)
  2007-12-10 15:34 ` Ed L. Cashin
@ 2007-12-10 19:21 ` Kay Sievers
  2007-12-10 20:07 ` Ed L. Cashin
  6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2007-12-10 19:21 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 2007-12-10 at 10:34 -0500, Ed L. Cashin wrote:
> On Mon, Dec 03, 2007 at 07:42:58PM +0100, Kay Sievers wrote:
> > On Mon, 2007-12-03 at 13:38 -0500, Ed L. Cashin wrote:
> > > On Mon, Dec 03, 2007 at 07:15:03PM +0100, Kay Sievers wrote:
> ...
> > > > Does this rule work for you? It should move all nodes into a subdir:
> > > >   SUBSYSTEM="aoe",              NAME="etherd/%k"
> > > 
> > > Yes, that's good for the block devices.  In the past it seems that
> > > rule doesn't guarantee the creation of the character device nodes,
> > > though, and that is why there is a separate rule for each character
> > > node in the patch I sent.  I haven't checked yet whether the latest
> > > udev and kernel still behave the same way.
> > 
> > Block devices always have SUBSYSTEM="block", this will only handle the
> > char devices. You want the block devices to be in a subdir?
> 
> Yes, the normal arrangement is for the "etherd" subdirectory in /dev
> to contain the character and block devices for the aoe driver.  It
> looks like,
> 
>   ecashin@ellijay:~$ ls -l /dev/etherd 
>   total 0
>   c-w--w---- 1 root disk 152,  3 Dec  7 16:24 discover
>   brw-rw---- 1 root disk 152, 16 Dec  7 17:02 e7.0
>   brw-rw---- 1 root disk 152,  0 Dec  7 17:02 e7.1
>   cr--r----- 1 root disk 152,  2 Dec  7 16:24 err
>   c-w--w---- 1 root disk 152,  6 Dec  7 16:24 flush
>   c-w--w---- 1 root disk 152,  4 Dec  7 16:24 interfaces
>   c-w--w---- 1 root disk 152,  5 Dec  7 16:24 revalidate
>   ecashin@ellijay:~$ 
> 
> (The block device minor numbers are different for this aoe6-55 driver
> than they would be for earlier versions.  This aoe6-55 driver relies
> on udev and assigns minor numbers dynamically.  Older drivers can't do
> that, and so have a more limited range of possible AoE shelf and slot
> addresses.)

I see, the block device nodes have the "etherd/" prefix in the kernel,
so they don't need a udev rule to move them there. The name in sysfs has
a '!', like "/sys/block/etherd!e7.0/", right?

Kay


-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: add rules for new aoe character devices
  2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
                   ` (5 preceding siblings ...)
  2007-12-10 19:21 ` Kay Sievers
@ 2007-12-10 20:07 ` Ed L. Cashin
  6 siblings, 0 replies; 8+ messages in thread
From: Ed L. Cashin @ 2007-12-10 20:07 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Dec 10, 2007 at 08:21:48PM +0100, Kay Sievers wrote:
...
> I see, the block device nodes have the "etherd/" prefix in the kernel,
> so they don't need a udev rule to move them there. The name in sysfs has
> a '!', like "/sys/block/etherd!e7.0/", right?

Yes, you are quite right.

  ellijay:/tmp/aoett# ls -ld /sys/block/*e*.*
  drwxr-xr-x 3 root root 0 Dec 10 11:31 /sys/block/etherd!e7.0
  drwxr-xr-x 3 root root 0 Dec 10 11:31 /sys/block/etherd!e7.1


-- 
  Ed L Cashin <ecashin@coraid.com>

-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2007-12-10 20:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29 17:11 add rules for new aoe character devices Ed L. Cashin
2007-12-03 18:15 ` Kay Sievers
2007-12-03 18:38 ` Ed L. Cashin
2007-12-03 18:42 ` Kay Sievers
2007-12-03 18:52 ` Matthias Schwarzott
2007-12-10 15:34 ` Ed L. Cashin
2007-12-10 19:21 ` Kay Sievers
2007-12-10 20:07 ` Ed L. Cashin

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