All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/26] Userspace-RCU for config accesses
@ 2016-06-20  8:08 Hannes Reinecke
  2016-06-20  8:08 ` [PATCH 01/26] Revert patch 'move filter_devnode() under vector lock' Hannes Reinecke
                   ` (26 more replies)
  0 siblings, 27 replies; 32+ messages in thread
From: Hannes Reinecke @ 2016-06-20  8:08 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

Hi all,

as Benjamin Marzinski pointed out the 'config' structure is
not protected, but it will be re-allocated whenever we do a
reconfiguration.
This leads to inevitable race conditions, which ATM are only
imperfectly handled.
With this patchset accesses to the configuration are RCU-protected,
so we are guaranteed that the pointer to the configuration is always
valid.
To facilitate this the patchset moves the 'cmd', 'dev', and 'dev_type'
entries out of the configuration, and replaces them with local variables
in multipath.

The patchset can be found at

github.com:/hreinecke/multipath-tools.git
branch rcu

As usual, comments and reviews are welcome.

Hannes Reinecke (26):
  Revert patch 'move filter_devnode() under vector lock'
  Use 'mptable' as argument for find_mpe() and get_mpe_wwid()
  config: set 'deferred_remove' defaults at correct call
  devmapper: explicit config settings
  dmparser: use 'is_daemon' as argument for disassemble_map()
  libmultipath: use 'is_daemon' as argument for domap() etc
  libmultipath: drop 'daemon' configuration setting
  libmultipath: Do not access 'conf->cmd' in domap()
  libmultipath: add 'cmd' as argument for get_refwwid()
  libmultipath: fallback to checking environment variable in
    get_udev_uid()
  multipath: make 'cmd' internal to multipath program
  multipath: make 'dev_type' internal to the multipath program
  multipath: make 'dev' internal to the multipath program
  libmultipath: separate out 'udev' config entry
  libmultipath: use 'checkint' as argument for sysfs_set_scsi_tmo()
  discovery: Pass in 'hwtable' for get_state() and
    scsi_sysfs_discovery()
  libmultipath: use 'struct config' as argument for pathinfo()
  checkers: use 'multipath_dir' as argument
  prio: use 'multipath_dir' as argument
  libmultipath: use 'timeout' as argument for getprio()
  libmultipath: use explicit 'config' argument for configuration file
    parsing
  libmultipath: use (get,put)_multipath_config() accessors
  multipathd: Fixup commandline argument handling
  multipath: make 'struct config' a local variable
  multipathd: use userspace RCU to access configuration
  libmultipath: Allocate keywords directly

 libmpathpersist/mpath_persist.c       |  28 +--
 libmpathpersist/mpath_persist.h       |   6 +-
 libmultipath/checkers.c               |  22 ++-
 libmultipath/checkers.h               |   6 +-
 libmultipath/config.c                 |  43 ++---
 libmultipath/config.h                 |  18 +-
 libmultipath/configure.c              | 163 +++++++++++------
 libmultipath/configure.h              |  10 +-
 libmultipath/debug.c                  |   3 +
 libmultipath/devmapper.c              |  21 +--
 libmultipath/devmapper.h              |   4 +-
 libmultipath/dict.c                   |  79 ++++----
 libmultipath/dict.h                   |   2 +-
 libmultipath/discovery.c              | 121 +++++++------
 libmultipath/discovery.h              |  12 +-
 libmultipath/dmparser.c               |   6 +-
 libmultipath/dmparser.h               |   2 +-
 libmultipath/parser.c                 |  61 +++----
 libmultipath/parser.h                 |  27 +--
 libmultipath/print.c                  |  72 ++++----
 libmultipath/print.h                  |  16 +-
 libmultipath/prio.c                   |  40 +++--
 libmultipath/prio.h                   |  14 +-
 libmultipath/prioritizers/alua.c      |  12 +-
 libmultipath/prioritizers/alua_rtpg.c |  25 +--
 libmultipath/prioritizers/alua_rtpg.h |   6 +-
 libmultipath/prioritizers/emc.c       |   8 +-
 libmultipath/prioritizers/hds.c       |   8 +-
 libmultipath/prioritizers/hp_sw.c     |  46 ++---
 libmultipath/prioritizers/ontap.c     |  19 +-
 libmultipath/prioritizers/rdac.c      |   8 +-
 libmultipath/propsel.c                |  99 +++++-----
 libmultipath/propsel.h                |  48 ++---
 libmultipath/structs_vec.c            |  62 ++++---
 libmultipath/structs_vec.h            |  13 +-
 libmultipath/waiter.c                 |   4 +
 libmultipath/wwids.c                  |  22 ++-
 mpathpersist/main.c                   |  24 ++-
 multipath/main.c                      | 199 ++++++++++++---------
 multipathd/Makefile                   |   2 +-
 multipathd/cli_handlers.c             |  84 ++++++---
 multipathd/main.c                     | 327 +++++++++++++++++++++++-----------
 multipathd/uxlsnr.c                   |   5 -
 43 files changed, 1063 insertions(+), 734 deletions(-)

-- 
2.6.6

^ permalink raw reply	[flat|nested] 32+ messages in thread
* [PATCHv2 00/26] Userspace-RCU for config accesses
@ 2016-07-04  7:08 Hannes Reinecke
  2016-07-04  7:08 ` [PATCH 17/26] libmultipath: use 'struct config' as argument for pathinfo() Hannes Reinecke
  0 siblings, 1 reply; 32+ messages in thread
From: Hannes Reinecke @ 2016-07-04  7:08 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel

Hi all,

as Benjamin Marzinski pointed out the 'config' structure is
not protected, but it will be re-allocated whenever we do a
reconfiguration.
This leads to inevitable race conditions, which ATM are only
imperfectly handled.
With this patchset accesses to the configuration are RCU-protected,
so we are guaranteed that the pointer to the configuration is always
valid.
To facilitate this the patchset moves the 'cmd', 'dev', and 'dev_type'
entries out of the configuration, and replaces them with local variables
in multipath.

Changes to the original version:
- Fixup arguments for get_mpe_wwid() and find_mpe() as
  found by Ben Marzinski
- Revert to original handling in get_state() as found
  by Ben Marzinski

The patchset can be found at

github.com:/hreinecke/multipath-tools.git
branch rcu.v2

As usual, comments and reviews are welcome.

Hannes Reinecke (26):
  Revert patch 'move filter_devnode() under vector lock'
  Use 'mptable' as argument for find_mpe() and get_mpe_wwid()
  config: set 'deferred_remove' defaults at correct call
  devmapper: explicit config settings
  dmparser: use 'is_daemon' as argument for disassemble_map()
  libmultipath: use 'is_daemon' as argument for domap() etc
  libmultipath: drop 'daemon' configuration setting
  libmultipath: Do not access 'conf->cmd' in domap()
  libmultipath: add 'cmd' as argument for get_refwwid()
  libmultipath: fallback to checking environment variable in
    get_udev_uid()
  multipath: make 'cmd' internal to multipath program
  multipath: make 'dev_type' internal to the multipath program
  multipath: make 'dev' internal to the multipath program
  libmultipath: separate out 'udev' config entry
  libmultipath: use 'checkint' as argument for sysfs_set_scsi_tmo()
  discovery: Pass in 'hwtable' for get_state() and
    scsi_sysfs_discovery()
  libmultipath: use 'struct config' as argument for pathinfo()
  checkers: use 'multipath_dir' as argument
  prio: use 'multipath_dir' as argument
  libmultipath: use 'timeout' as argument for getprio()
  libmultipath: use explicit 'config' argument for configuration file
    parsing
  libmultipath: use (get,put)_multipath_config() accessors
  multipathd: Fixup commandline argument handling
  multipath: make 'struct config' a local variable
  multipathd: use userspace RCU to access configuration
  libmultipath: Allocate keywords directly

 libmpathpersist/mpath_persist.c       |  28 +--
 libmpathpersist/mpath_persist.h       |   6 +-
 libmultipath/checkers.c               |  22 ++-
 libmultipath/checkers.h               |   6 +-
 libmultipath/config.c                 |  43 ++---
 libmultipath/config.h                 |  18 +-
 libmultipath/configure.c              | 163 +++++++++++------
 libmultipath/configure.h              |  10 +-
 libmultipath/debug.c                  |   3 +
 libmultipath/devmapper.c              |  21 +--
 libmultipath/devmapper.h              |   4 +-
 libmultipath/dict.c                   |  79 ++++----
 libmultipath/dict.h                   |   2 +-
 libmultipath/discovery.c              | 108 ++++++-----
 libmultipath/discovery.h              |  12 +-
 libmultipath/dmparser.c               |   6 +-
 libmultipath/dmparser.h               |   2 +-
 libmultipath/parser.c                 |  61 +++----
 libmultipath/parser.h                 |  27 +--
 libmultipath/print.c                  |  72 ++++----
 libmultipath/print.h                  |  16 +-
 libmultipath/prio.c                   |  40 +++--
 libmultipath/prio.h                   |  14 +-
 libmultipath/prioritizers/alua.c      |  12 +-
 libmultipath/prioritizers/alua_rtpg.c |  25 +--
 libmultipath/prioritizers/alua_rtpg.h |   6 +-
 libmultipath/prioritizers/emc.c       |   8 +-
 libmultipath/prioritizers/hds.c       |   8 +-
 libmultipath/prioritizers/hp_sw.c     |  46 ++---
 libmultipath/prioritizers/ontap.c     |  19 +-
 libmultipath/prioritizers/rdac.c      |   8 +-
 libmultipath/propsel.c                |  99 +++++-----
 libmultipath/propsel.h                |  48 ++---
 libmultipath/structs_vec.c            |  62 ++++---
 libmultipath/structs_vec.h            |  13 +-
 libmultipath/waiter.c                 |   4 +
 libmultipath/wwids.c                  |  22 ++-
 mpathpersist/main.c                   |  24 ++-
 multipath/main.c                      | 199 ++++++++++++---------
 multipathd/Makefile                   |   2 +-
 multipathd/cli_handlers.c             |  84 ++++++---
 multipathd/main.c                     | 327 +++++++++++++++++++++++-----------
 multipathd/uxlsnr.c                   |   5 -
 43 files changed, 1057 insertions(+), 727 deletions(-)

-- 
2.6.6

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2016-07-04  7:08 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20  8:08 [PATCH 00/26] Userspace-RCU for config accesses Hannes Reinecke
2016-06-20  8:08 ` [PATCH 01/26] Revert patch 'move filter_devnode() under vector lock' Hannes Reinecke
2016-06-20  8:08 ` [PATCH 02/26] Use 'mptable' as argument for find_mpe() and get_mpe_wwid() Hannes Reinecke
2016-07-01 19:48   ` Benjamin Marzinski
2016-06-20  8:08 ` [PATCH 03/26] config: set 'deferred_remove' defaults at correct call Hannes Reinecke
2016-06-20  8:08 ` [PATCH 04/26] devmapper: explicit config settings Hannes Reinecke
2016-06-20  8:08 ` [PATCH 05/26] dmparser: use 'is_daemon' as argument for disassemble_map() Hannes Reinecke
2016-06-20  8:08 ` [PATCH 06/26] libmultipath: use 'is_daemon' as argument for domap() etc Hannes Reinecke
2016-06-20  8:08 ` [PATCH 07/26] libmultipath: drop 'daemon' configuration setting Hannes Reinecke
2016-06-20  8:08 ` [PATCH 08/26] libmultipath: Do not access 'conf->cmd' in domap() Hannes Reinecke
2016-06-20  8:08 ` [PATCH 09/26] libmultipath: add 'cmd' as argument for get_refwwid() Hannes Reinecke
2016-06-20  8:08 ` [PATCH 10/26] libmultipath: fallback to checking environment variable in get_udev_uid() Hannes Reinecke
2016-06-20  8:08 ` [PATCH 11/26] multipath: make 'cmd' internal to multipath program Hannes Reinecke
2016-06-20  8:08 ` [PATCH 12/26] multipath: make 'dev_type' internal to the " Hannes Reinecke
2016-06-20  8:09 ` [PATCH 13/26] multipath: make 'dev' " Hannes Reinecke
2016-06-20  8:09 ` [PATCH 14/26] libmultipath: separate out 'udev' config entry Hannes Reinecke
2016-06-20  8:09 ` [PATCH 15/26] libmultipath: use 'checkint' as argument for sysfs_set_scsi_tmo() Hannes Reinecke
2016-06-20  8:09 ` [PATCH 16/26] discovery: Pass in 'hwtable' for get_state() and scsi_sysfs_discovery() Hannes Reinecke
2016-06-20  8:09 ` [PATCH 17/26] libmultipath: use 'struct config' as argument for pathinfo() Hannes Reinecke
2016-07-01 20:25   ` Benjamin Marzinski
2016-07-04  5:49     ` Hannes Reinecke
2016-06-20  8:09 ` [PATCH 18/26] checkers: use 'multipath_dir' as argument Hannes Reinecke
2016-06-20  8:09 ` [PATCH 19/26] prio: " Hannes Reinecke
2016-06-20  8:09 ` [PATCH 20/26] libmultipath: use 'timeout' as argument for getprio() Hannes Reinecke
2016-06-20  8:09 ` [PATCH 21/26] libmultipath: use explicit 'config' argument for configuration file parsing Hannes Reinecke
2016-06-20  8:09 ` [PATCH 22/26] libmultipath: use (get, put)_multipath_config() accessors Hannes Reinecke
2016-06-20  8:09 ` [PATCH 23/26] multipathd: Fixup commandline argument handling Hannes Reinecke
2016-06-20  8:09 ` [PATCH 24/26] multipath: make 'struct config' a local variable Hannes Reinecke
2016-06-20  8:09 ` [PATCH 25/26] multipathd: use userspace RCU to access configuration Hannes Reinecke
2016-06-20  8:09 ` [PATCH 26/26] libmultipath: Allocate keywords directly Hannes Reinecke
2016-07-01 20:44 ` [PATCH 00/26] Userspace-RCU for config accesses Benjamin Marzinski
2016-07-04  7:08 [PATCHv2 " Hannes Reinecke
2016-07-04  7:08 ` [PATCH 17/26] libmultipath: use 'struct config' as argument for pathinfo() Hannes Reinecke

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.