multipathd: allow devices to switch from RW to RO
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 7 Apr 2017 06:16:36 +0000 (01:16 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 12 Apr 2017 07:22:37 +0000 (09:22 +0200)
commite6811f3c7b56372ae9be91fb9c81456f65b40ed7
tree0a034ba6abece3a7a17940d2a5ac8f8a95587eb1
parent10704bae99cdcc809aaba0546017cb2eb416c551
multipathd: allow devices to switch from RW to RO

Whenever multipathd tries to reload a device, even if it's because a
path switched from read/write to read-only, it tries to load the device
read/write first, and then falls back to read-only. When device-mapper
sees that multipath is using the same devices in the same state in its
new table, it simply reuses the devices from the old table, instead of
closing and re-opening them. This means that multipath can successfully
reload the multipath device read/write, even if a path device has
switched to read-only.  To deal with this, multipathd now doesn't try to
reload a device read/write when it sees that a path device has switched
to read-only.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmultipath/devmapper.c
libmultipath/structs.h
multipathd/main.c