Age | Commit message (Collapse) | Author |
|
Scsi_id hasn't been changed to use the latest libsysfs changes. The
"directory" in the sysfs_class_device is now considered "private" and only
should be accessed using functions. Treating the structures as handles lets
us only load information when it's needed, reducing caching or stale
information and also helping performance.
Here's the problem.
static inline char *sysfs_get_attr(struct sysfs_class_device *dev,
const char *attr)
{
return sysfs_get_value_from_attributes(dev->directory->attributes,
attr);
}
Please try this quick fix:
|
|
* Make the HW-specific get_unique_id switch pretty
* Prepare to field-test by whitelisting all known fibre array, try to
fetch WWID from the standard EVPD 0x83 off 8 for everyone ... we will
learn from feedback :)
Could you drop a note with the udev-009 release-notes asking for testing
this WWID fetching thing ?
|
|
* configure the multipath target with round-robin path selector and
conservative default for a start : yes it makes this release the first
really useful one.
* temporarily disable map creation for single path device due to current
restrictive defaults in the kernel target. Sistina should work it out.
* correct the strncmp logic in blacklist function.
Tested on StorageWorks with 2.6.0-test10-udm1 :
xa-s03:~# ./multipath -v
60001fe1000bdad0000903507109004b (1 0 1 1) /dev/sda op:1 /dev/sda
[HSG80 ]
60001fe1000bdad000090371312100bf (1 0 1 2) /dev/sdb op:1 /dev/sdb
[HSG80 ]
60001fe1000bdad000090371312100c2 (1 0 1 3) /dev/sdc op:1 /dev/sdc
[HSG80 ]
60001fe1000bdad00009037131210067 (1 0 2 1) /dev/sdd op:1 /dev/sdd
[HSG80 ]
60001fe1000bdad000090371312100b3 (1 0 2 2) /dev/sde op:1 /dev/sde
[HSG80 ]
60001fe1000bdad00009035071090024 (1 0 2 3) /dev/sdf op:1 /dev/sdf
[HSG80 ]
600508b4000156d700012000000b0000 (1 0 3 1) /dev/sdg op:1 /dev/sdg
[HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (1 0 3 2) /dev/sdh op:1 /dev/sdh
[HSV110 (C)COMPAQ]
600508b4000156d700012000000b0000 (1 0 6 1) /dev/sdi op:1 /dev/sdi
[HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (1 0 6 2) /dev/sdj op:1 /dev/sdj
[HSV110 (C)COMPAQ]
60001fe1000bdad0000903507109004b
\_(1 0 1 1) /dev/sda op:1 /dev/sda [HSG80 ]
60001fe1000bdad000090371312100bf
\_(1 0 1 2) /dev/sdb op:1 /dev/sdb [HSG80 ]
60001fe1000bdad000090371312100c2
\_(1 0 1 3) /dev/sdc op:1 /dev/sdc [HSG80 ]
60001fe1000bdad00009037131210067
\_(1 0 2 1) /dev/sdd op:1 /dev/sdd [HSG80 ]
60001fe1000bdad000090371312100b3
\_(1 0 2 2) /dev/sde op:1 /dev/sde [HSG80 ]
60001fe1000bdad00009035071090024
\_(1 0 2 3) /dev/sdf op:1 /dev/sdf [HSG80 ]
600508b4000156d700012000000b0000
\_(1 0 3 1) /dev/sdg op:1 /dev/sdg [HSV110 (C)COMPAQ]
\_(1 0 6 1) /dev/sdi op:1 /dev/sdi [HSV110 (C)COMPAQ]
600508b4000156c30001200000210000
\_(1 0 3 2) /dev/sdh op:1 /dev/sdh [HSV110 (C)COMPAQ]
\_(1 0 6 2) /dev/sdj op:1 /dev/sdj [HSV110 (C)COMPAQ]
N|600508b4000156d700012000000b0000 : 0 4194304 multipath 2 2 10
round-robin 2 /dev/sdg 10 2 1 2 /dev/sdi 10 2 1 2
N|600508b4000156c30001200000210000 : 0 20971520 multipath 2 2 10
round-robin 2 /dev/sdh 10 2 1 2 /dev/sdj 10 2 1 2
xa-s03:~# dmsetup ls
600508b4000156c30001200000210000 (254, 1)
600508b4000156d700012000000b0000 (254, 0)
xa-s03:~# ll /dev/mapper/
total 0
brw------- 1 root root 254, 1 Dec 9 22:57
600508b4000156c30001200000210000
brw------- 1 root root 254, 0 Dec 9 22:57
600508b4000156d700012000000b0000
crw------- 1 root root 10, 63 Jul 25 22:48 control
xa-s03:~# dd if=/dev/mapper/600508b4000156c30001200000210000
of=/dev/null bs=1M count=500
500+0 records in
500+0 records out
524288000 bytes transferred in 5.662530 seconds (92589003 bytes/sec)
gee, that pretty fast :)
|
|
* update the Makefiles to autodetect libgcc.a & gcc includes
"ulibc-style". Factorisation of udevdirs & others niceties
* drop a hint about absent /dev/sd? on failed open() for poor Debian
users who don't imagine their favorite distro with only 16 preconfigured
SCSI device nodes :)
|
|
This patch updates scsi_id under udev from version 0.1 to version 0.2.
|
|
* implement a reschedule flag in /var/run. Last thing the prog do before
exit is check if a call to multipath was done (but canceled by
/var/run/multipath.run check) during its execution. If so restart the
main loop.
* implement a blacklist of sysfs bdev to not bother with for now (hd,
md, dm, sr, scd, ram, raw). This avoid sending SG_IO to unappropiate
devices.
Compiles & survive "while true;do (./multipath -v &);done"
|
|
* Adds a /var/run/multipath.run handling to avoid simultaneous runs.
* Remove a commented-out "printf"
|
|
here is the next update which brings this multipath to the state i'm not
ashamed of it being in udev :)
* drop a libdevmapper copy in extras/multipath; maybe discussions w/
Sistina folks will bring a better solution in the future.
* drop a putchar usage in libdevmapper to compile cleanly with klibc
* drop another such usage of my own in main.c
* massage the Makefile to compile libdevmapper against klibc
* use "ld" to produce the binary rather than "gcc -static"
* stop being stupid w/ uneeded major, minor & dev in main.c:dm_mk_node()
* reverse to creating striped target for now because the multipath
target is more hairy than expected initialy
* push the version code to 009 to be in synch w/ udev
builds & run here.
binary size is 43ko, which is fairly gratifying after all the efforts
I've put to compiling it with klibc :)
|
|
here is a clean-up patch :
* removes sg_err.[ch] deps
* makes sure the core code play nice with klibc
* port the sysfs calls to dlist helpers
* links against udev's sysfs (need libsysfs.a & dlist.a)
* finally define DM_TARGET as "multipath" as Joe posted the code today
(not tested yet)
* push version forward (do you want it in sync with udev version?)
libdevmapper doesn't play well with klibc, so I wasn't able to produce a
static binary yet. Help needed here ... as I don't want to fall back to
merge libdevmapper code in the core.
It compiles here and doesn't segfault.
|
|
|
|
<christophe.varoqui@free.fr>
|