From: Martin Wilck <mwilck@suse.com>
To: dm-devel@redhat.com
Subject: Re: [PATCH 7/9] multipathd: allow devices to switch from RW to RO
Date: Thu, 13 Apr 2017 16:39:45 +0200 [thread overview]
Message-ID: <1492094385.22602.3.camel@suse.com> (raw)
In-Reply-To: <1491545798-22183-8-git-send-email-bmarzins@redhat.com>
On Fri, 2017-04-07 at 01:16 -0500, Benjamin Marzinski wrote:
> 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 | 9 +++++----
> libmultipath/structs.h | 1 +
> multipathd/main.c | 3 +++
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/multipathd/main.c b/multipathd/main.c
> index f4ff13e..995e580 100644
> --- a/multipathd/main.c
> +++ b/multipathd/main.c
> @@ -1017,7 +1017,10 @@ uev_update_path (struct uevent *uev, struct
> vectors * vecs)
> if (mpp->wait_for_udev)
> mpp->wait_for_udev = 2;
> else {
> + if (ro == 1)
> + pp->mpp->force_readonly = 1;
> retval = reload_map(vecs, mpp, 0,
> 1);
> + pp->mpp->force_readonly = 0;
Why don't you leave this set to 1 until all paths have been switched to
rw mode? AFAICS, if any uevent arrives except a switch to ro (assume
several paths are ro and one switches back to rw), multipathd will
reload the map r/w. Or am I overlooking something?
Regards,
Martin
--
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2017-04-13 14:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 6:16 [PATCH 0/9] misc cleanups and bugfixes Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 1/9] libdmmp: minor Makefile cleanup Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 2/9] multipath-tools: remove incdir from Makefiles Benjamin Marzinski
2017-04-13 13:29 ` Martin Wilck
2017-04-07 6:16 ` [PATCH 3/9] libdmmp: don't disconnect from multipathd twice Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 4/9] multipathd: don't call strlen on NULL variables Benjamin Marzinski
2017-04-13 14:12 ` Martin Wilck
2017-04-07 6:16 ` [PATCH 5/9] libdmmp: move libdmmp.pc install location Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 6/9] multipathd: drop lock before calling uev_add_path Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 7/9] multipathd: allow devices to switch from RW to RO Benjamin Marzinski
2017-04-13 14:39 ` Martin Wilck [this message]
2017-04-13 17:53 ` Benjamin Marzinski
2017-04-13 14:40 ` Martin Wilck
2017-04-07 6:16 ` [PATCH 8/9] libmultipath: don't set max_sectors_kb on reloads Benjamin Marzinski
2017-04-07 6:16 ` [PATCH 9/9] multipath: fix segfault with disable_changed_wwids Benjamin Marzinski
2017-04-07 7:28 ` Shichangkuo
2017-04-12 7:36 ` [PATCH 0/9] misc cleanups and bugfixes Christophe Varoqui
2017-04-13 14:56 ` Martin Wilck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492094385.22602.3.camel@suse.com \
--to=mwilck@suse.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.