IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
On Thu, Feb 12, 2004 at 05:34:57PM -0800, Greg KH wrote:
> On Tue, Feb 10, 2004 at 09:14:20AM +0100, Hannes Reinecke wrote:
> > Hi all,
> >
> > this patch makes the format for NAME and SYMLINK a bit more flexible:
> > I've added a new format specifier '%s{<SYSFS_var>}', which allows for
> > the value of any sysfs entry found for this device to be inserted.
> > Example (for our S/390 fcp adapter):
> >
> > BUS="ccw", SYSFS_devtype="1732/03", NAME="%k" \
> > SYMLINK="zfcp-%s{hba_id}-%s{wwpn}:%s{fcp_lun}"
> >
> > I know this could also be done with an external program, but having this
> > incorporated into udev makes life easier, especially if run from
> > initramfs. Plus it makes the rules easier to follow, as the result is
> > directly visible and need not to be looked up in some external program.
> >
> > Comments etc. welcome.
>
> Oops, sorry I missed this for the 017 release. I'll look at it tomorrow
> and get back to you. At first glance it looks like a good thing.
>
> Oh, you forgot to update the documentation, that's important to do if
> you want this change to make it in :)
I took a part of the code and made a version that uses already implemented
attribute finding logic.
The parsing of the format length '%3x' and the '%x{attribute}' is a fuction now,
maybe there are more possible users in the future.
I've also added the test to udev-test.pl.
incremental to udev-016/extras/multipath-0.0.16.3,
* add a GROUP_BY_SERIAL flag. This should be useful for
controlers that activate their spare paths on simple IO
submition with a penalty. The StorageWorks HW defaults to
this mode, even if the MULTIBUS mode is OK.
* remove unused sg_err.c
* big restructuring : split devinfo.c from main.c. Export :
* void basename (char *, char *);
* int get_serial (int, char *);
* int get_lun_strings (char *, char *, char *, char *);
* int get_evpd_wwid(char *, char *);
* long get_disk_size (char *);
Now we see clearly what is expected from an external package
like scsi_id.
* stop passing struct env as param
> Hello,
>
> incremental to udev-016/extras/multipath,
>
> * don't rely on the linux symlink in the udev/klibc dir since
> udev build doesn't use it anymore. This corrects build breakage
> * remove make_dm_node fn & call. Rely on udev for this.
>
> The first patch is to be applied.
> The second is conditioned by udev dealing correctly with devmap names.
>
> For this I can suggest a CALLOUT rule like this :
> KERNEL="dm-[0-9]*", PROGRAM="/tmp/name_devmap %M %m", NAME="%k",
> SYMLINK="%c"
>
> With name_devmap like :
> #!/bin/sh
> /usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'
>
ok I coded the suggested tool.
it works with the following rule :
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"
I don't know if it's right to keep this tools packaged with multipath because
it's widely more general.
Maybe Joe should merge it in the device-mapper package or provide the
functionnality through dmsetup ?
Shouldn't we keep the temporary strings out of the database,
or is this information useful for something?
It cuts the length of the data from 628 to 275 bytes.
Allow wild card comparison of the ID.
Using strcmp_pattern here also means we on longer match partial values,
for example, a scsi rule like this won't match anymore:
BUS="scsi", ID=":0", NAME="sdfoo-short-bus_id-1"
But this now works:
BUS="scsi", ID="*:0", NAME="sdfoo-bus_id-wild-card-1"
Kill the extra bus_id check in match_id. This is wrong, especially since
we check for rule matches with the parent devices on a given devices path.
For example, given a device path of:
/sys/devices/pci0000:01/0000:01:0c.0/host5/5:0:2:0
With this patch, the following rule will no longer match:
BUS="scsi", ID="host5", NAME="sd-bus_id-host5"
Here is a small improvement. We check for the type of message we receive
and udevsend seems not to need all the credential setup stuff, the
kernel will fill it for us.
udevd now refuses to start as non root, cause it doesn't make any sense.
just put the test number on the command line:
udev-test.pl 3
will run test number 3
If no test number is specified, all of the tests will be run, just like before.
Here is the badly needed client authorization for udevd.
Since we switched to abstract namespace sockets, we are unable to
control the access of the socket by file permissions.
So here we send a ancillary credential message with every datagram,
to be able to verify the uid of the sender. The sender can't fake the
credentials, cause the kernel doesn't allow it for non root users.
udevd is still working with klibc here :)
On Mon, Feb 09, 2004 at 05:41:15AM +0100, Kay Sievers wrote:
> It seems that today was just another udev-sunday for me :)
>
> Here is a working patch to compile udevd with klibc.
>
> It's sweet the static binary takes 6 kbytes and it runs
> with only 80 kbytes virtual memory.
>
> I changed a few peaces and added a siginterrupt.c file to klibc.
> We may check with hpa to get the changes upstream?
So here is the next try :)
hpa, for good reason, didn't like my changes to klibc.
He will dump signal() completely from klibc instead, so here we switch to
sigaction() and keep udevd working with klibc.
On Sun, Feb 08, 2004 at 04:36:01PM +0100, Kay Sievers wrote:
> We don't handle NAME="" the right way. Thanks to Emil None <emil71se@yahoo.com>
> for pointing this out. Here is a fix for it and a trivial style cleanup.
Changed the ignore dbg() to info().
Once again, patch to make logging a config option.
Reason for this (since you asked for it):
- In our setup it is easy (although still annoying) .. just edit the
ebuild, add logging support (or remove it) and rebuild. For say a
binary distro, having the logging is useful for debugging some
times, but its more a once of, or rare thing, as you do not add or
change config files every day. Sure, we can have logging by
default, but many do not want ~300 lines of extra debugging in their
logs is not pleasant, and they will complain. Rebuilding the
package for that binary package (given the users it is targeted to)
is usually not within most users grasp.
On Fri, Feb 06, 2004 at 01:08:24AM -0500, Chris Friesen wrote:
>
> Kay, you said "unless we can get rid of _all_ the threads or at least
> getting faster, I don't want to change it."
>
> Well how about we get rid of all the threads, *and* we get faster?
Yes, we are twice as fast now on my box :)
> This patch applies to current bk trees, and does the following:
>
> 1) Switch to DGRAM sockets rather than STREAM. This simplifies things
> as mentioned in the previous message.
>
> 2) Invalid sequence numbers are mapped to -1 rather than zero, since
> zero is a valid sequence number (I think). Also, this allows for real
> speed tests using scripts starting at a zero sequence number, since that
> is what the initial expected sequence number is.
>
> 3) Get rid of all threading. This is the biggie. Some highlights:
> a) timeout using setitimer() and SIGALRM
> b) async child death notification via SIGCHLD
> c) these two signal handlers do nothing but raise volatile flags,
> all the
> work is done in the main loop
> d) locking no longer required
I cleaned up the rest of the comments, the whitespace and a few names to match
the whole thing. Please recheck it. Test script is switched to work on subsystem
'test' to let udev ignore it.
incremental to udev-016/extras/multipath,
* don't rely on the linux symlink in the udev/klibc dir since
udev build doesn't use it anymore. This corrects build breakage
* remove make_dm_node fn & call. Rely on udev for this.
The first patch is to be applied.
The second is conditioned by udev dealing correctly with devmap names.
For this I can suggest a CALLOUT rule like this :
KERNEL=3D"dm-[0-9]*", PROGRAM=3D"/tmp/name_devmap %M %m", NAME=3D"%k", SY=
MLINK=3D"%c"
With name_devmap like :
#!/bin/sh
/usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'
It seems that the guys are no longer differ about the right size of the
socket address :)
The kernel simply takes all bytes until the specified length as the name,
so the real length should be enough.
As Chris Friesen <chris_friesen@sympatico.ca> suggested, here we switch
the unix domains socket path to abstract namespace and get rid of the
socket file in the filesystem.
Hey, this was new to me today. So here a few words:
Linux supports a abstract namespace for sockets. We don't need a
physical file on the filesystem but only a unique string magically
starting with the '\0' character.
strace with real file:
connect(3, {sa_family=AF_UNIX, path="/udev/.udevd.sock"}, 110)
strace with abstract namespace:
connect(3, {sa_family=AF_UNIX, path=@udevd}, 110)
This patch allows udevsend to be called by the user and not only by the
kernel with its SEQNUM. If no SEQNUM is given, we move the event straight
to the exec queue and don't look if something is missing.
I don't know if this is really needed, but some people seem trying to
send events trough udevd instead of calling udev directly with their
scripts and confuse the reorder logic with that.
So at least, we may remove this source of confusion and udevsend is much
much faster back than udev itself and it will also block concurrent events
for the same devpath.