1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 20:25:38 +03:00
Commit Graph

762 Commits

Author SHA1 Message Date
dsteklof@us.ibm.com
bcbe2d8e7d [PATCH] libsysfs 0.4.0 patch
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.
2005-04-26 21:13:09 -07:00
dsteklof@us.ibm.com
ff3633bf9d [PATCH] fix scsi_id segfault with udev-009
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:
2005-04-26 21:13:09 -07:00
christophe.varoqui@free.fr
9e919aa4f0 [PATCH] more extras/multipath changes
* 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 ?
2005-04-26 21:13:08 -07:00
christophe.varoqui@free.fr
197a978ea3 [PATCH] and more extras/multipath updates
* 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 :)
2005-04-26 21:13:07 -07:00
christophe.varoqui@free.fr
61f76f5c9c [PATCH] more extras/multipath updates
* 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 :)
2005-04-26 21:13:07 -07:00
patmans@us.ibm.com
1bed1db499 [PATCH] update udev extras/scsi_id to version 0.2
This patch updates scsi_id under udev from version 0.1 to version 0.2.
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
a652254ddb [PATCH] yet more extras/multipath
* 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"
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
d877515791 [PATCH] more extras/multipath updates
* Adds a /var/run/multipath.run handling to avoid simultaneous runs.
* Remove a commented-out "printf"
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
2bf80b67d1 [PATCH] extras/multipath update
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 :)
2005-04-26 21:13:06 -07:00
christophe.varoqui@free.fr
359618cd6e [PATCH] udev-007/extras/multipath update
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.
2005-04-26 21:13:04 -07:00
greg@kroah.com
c521693b54 [PATCH] add scsi_id "extra" program from Patrick Mansfield <patmans@us.ibm.com> 2005-04-26 21:06:24 -07:00
greg@kroah.com
04a091d47e [PATCH] Add multipath "extra" program from Christophe Varoqui, <christophe.varoqui@free.fr> 2005-04-26 21:06:24 -07:00