[libmultipath] cache sysfs_devices
authorGuido Guenther <agx@sigxcpu.org>
Fri, 20 Jul 2007 22:13:51 +0000 (00:13 +0200)
committerChristophe Varoqui <christophe.varoqui@free.fr>
Fri, 20 Jul 2007 22:13:51 +0000 (00:13 +0200)
commitb413c9dbe554c2d50aba7c6446ec86f850cf8dde
tree4e2289039d4c9da3c04024d6df4a0a3307a535ca
parent00fe3ac6ff515bec4a2c7385d6e2e4a7ed5dfb36
[libmultipath] cache sysfs_devices

this one fixes the described bug of paths coming back as different block
devices:

Keep a list of sysfs devices for sysfs_device_get() so uev_trigger() can look
up the necessary information for proper path removal in case of a 'remove'
uevent - the sysfs files in the filesystem might be long gone at this point.

This also plugs a memory leak where we'd malloc space for the same sysfs device
over and over again for every processed uevent.
libmultipath/sysfs.c