[dm-devel] [PATCH 00/16] Move to libudev

Hannes Reinecke hare at suse.de
Mon Apr 30 10:25:51 UTC 2012


This patchset moves the entire sysfs handling in multipath-tools
over to libudev. The hand-crafted sysfs access is removed, as is
all the directory traversal through sysfs.

In doing so I've removed the former 'getuid' callout and replaced
it by referencing an udev attribute 'uid_attribute'. Per default
this is being set to 'ID_SERIAL', as this is an attribute which is
being generated by udev for each device.
And handily has the same format as the output of getuid.

I have also included some compability routines for compiling on
older versions.

Hannes Reinecke (16):
  Use devpath as argument for sysfs functions
  multipathd: remove references to sysfs_device
  multipathd: use struct path as argument for event processing
  Add global udev reference pointer to config
  Use udev enumeration during discovery
  use struct udev_device during discovery
  Remove stale variable in sysfs_attr_get_value
  Use struct udev_device instead of sysdev
  discovery: Fixup cciss discovery
  Use udev attribute instead of getuid_callout()
  Use udev devices during discovery
  Remove all references to hand-craftes sysfs code
  uevent: Remove failback_listen()
  Simplify uevent processing
  Compilation fix for system not providing OOM_SCORE_ADM_MIN
  Fix compilation on older udev versions

 libmpathpersist/mpath_persist.c |    5 -
 libmultipath/Makefile           |    7 +
 libmultipath/blacklist.c        |   28 +-
 libmultipath/blacklist.h        |    8 +-
 libmultipath/config.c           |   28 +-
 libmultipath/config.h           |   10 +-
 libmultipath/defaults.h         |    2 +-
 libmultipath/dict.c             |   55 +---
 libmultipath/discovery.c        |  685 +++++++++++++++++----------------------
 libmultipath/discovery.h        |    8 +-
 libmultipath/hwtable.c          |  102 ++-----
 libmultipath/propsel.c          |   24 +-
 libmultipath/structs.c          |    8 +-
 libmultipath/structs.h          |   12 +-
 libmultipath/structs_vec.c      |   13 +-
 libmultipath/sysfs.c            |  384 +++-------------------
 libmultipath/sysfs.h            |   22 +--
 libmultipath/uevent.c           |  375 +++------------------
 libmultipath/uevent.h           |    6 +-
 libmultipath/util.c             |   16 +-
 libmultipath/util.h             |    3 +-
 multipath/main.c                |    5 -
 multipath/multipath.conf.5      |   20 +-
 multipathd/Makefile             |    2 +-
 multipathd/cli_handlers.c       |   48 +++-
 multipathd/main.c               |  214 +++++--------
 multipathd/main.h               |    8 +-
 27 files changed, 671 insertions(+), 1427 deletions(-)

-- 
1.7.3.4




More information about the dm-devel mailing list