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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
incremental to 20031220,
2003-12-22 multipath-010
* don't print .sg_dev if equal to .dev (2.6) in print_path()
* since the kernel code handles defective paths, remove all
code to cope with them :
* move do_tur() to unused.c
* remove .state from path struct
* remove .state settings & conditionals
* add a cmdline switch to force maps to failover mode,
ie 1 path per priority group
* add default policies to the whitelist array (spread io ==
MULTIBUS / io forced to 1 path == FAILOVER)
* move get_disk_size() call out of add_map() to coalesce()
* comment tricky coalesce() fn
* bogus unsused.c file renamed to unused.c
An important one, against stock udev-009 :
2003-12-20 multipath-010
* big ChangeLog update
* start to give a little control over target params :
introduce cmdline arg -i to control polling interval
* cope with hotplug-style calling convention :
ie "multipath scsi $DEVPATH" ... to avoid messing with
online maps not concerned by an event
* example hotplug agent to drop in /etc/hotplug.d/scsi
* revert the run & resched patch : unless someone proves me
wrong, this was overdesigned
* move commented out functions in unused.c
* update multipath target params to "udm[23] style"
* mp target now supports nr_path == 1, so do we
* add gratuitous free()
* push version forward
Here is a experimental CALLOUT script for udev to create devfs nodes
for IDE-devices. Not that I need these, I just wanted to see if it works :)
The script is really stupid, no error handling, nothing more than
absolutely needed. The rule uses the 'k' format char of the previous
patch. The %D is not used, so the user can have disc or disk :)
this single line:
CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c"
creates the following on my machine with two hard disks, one DVD and a PCMCIA-compact-flash inserted:
/udev
|-- hda
|-- hda1
|-- hda2
|-- hda4
|-- hdb
|-- hdb1
|-- hdc
|-- hde
|-- hde1
`-- ide
|-- host0
| |-- bus0
| | |-- target0
| | | `-- lun0
| | | |-- disc -> ../../../../../hda
| | | |-- part1 -> ../../../../../hda1
| | | |-- part2 -> ../../../../../hda2
| | | `-- part4 -> ../../../../../hda4
| | `-- target1
| | `-- lun0
| | |-- disc -> ../../../../../hdb
| | `-- part1 -> ../../../../../hdb1
| `-- bus1
| `-- target0
| `-- lun0
| `-- cd -> ../../../../../hdc
`-- host2
`-- bus0
`-- target0
`-- lun0
|-- disc -> ../../../../../hde
`-- part1 -> ../../../../../hde1
Ananth released sysfsutils 0.4.0 last night, I'm sure you saw the email.
Here's a patch with the latest changes from the pre-patch I already
gave you. It includes sysfs_get_device_parent(), which you said you
needed. I've run your test scripts and I've built scsi_id. Please
play around with this and check it out.
There are quite a few changes. Please do not access
structure pointers, like sysfs_device's parent, directly like
dev->parent. Please use the "get" function to retrieve. The functions
load things on demand and refresh views under the covers.
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 ?
* 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 :)
* 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"
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.