From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: Martin Wilck <mwilck@suse.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH 4/6] libmultipath: fix suspended devs from failed reloads
Date: Wed, 17 May 2017 11:25:46 -0500 [thread overview]
Message-ID: <20170517162546.GP22856@octiron.msp.redhat.com> (raw)
In-Reply-To: <1494961000.4700.15.camel@suse.com>
On Tue, May 16, 2017 at 08:56:40PM +0200, Martin Wilck wrote:
> On Tue, 2017-05-16 at 12:33 -0500, Benjamin Marzinski wrote:
> > On Thu, May 11, 2017 at 10:26:52PM +0200, Martin Wilck wrote:
> > > On Tue, 2017-05-09 at 11:57 -0500, Benjamin Marzinski wrote:
> > > > When multipath reloads a device, it can either fail while loading
> > > > the
> > > > new table or while resuming the device. If it fails while
> > > > resuming
> > > > the
> > > > device, the device can get stuck in the suspended state. To fix
> > > > this,
> > > > multipath needs to resume the device again so that it can
> > > > continue
> > > > using
> > > > the old table.
> > > >
> > > > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > > > ---
> > > > libmultipath/devmapper.c | 19 ++++++++++++++++++-
> > > > libmultipath/devmapper.h | 1 +
> > > > 2 files changed, 19 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> > > > index 2c4a13a..69b634b 100644
> > > > --- a/libmultipath/devmapper.c
> > > > +++ b/libmultipath/devmapper.c
> > > > @@ -396,7 +396,13 @@ int dm_addmap_reload(struct multipath *mpp,
> > > > char
> > > > *params, int flush)
> > > > if (r)
> > > > r = dm_simplecmd(DM_DEVICE_RESUME, mpp->alias,
> > > > !flush,
> > > > 1, udev_flags, 0);
> > > > - return r;
> > > > + if (r)
> > > > + return r;
> > > > +
> > > > + if (dm_is_suspended(mpp->alias))
> > > > + dm_simplecmd(DM_DEVICE_RESUME, mpp->alias,
> > > > !flush,
> > > > 1,
> > > > + udev_flags, 0);
> > > > + return 0;
> > > > }
> > >
> > > Why would the second DM_DEVICE_RESUME call succeed if the first one
> > > failed?
> >
> > Because if the first resume fails, device-mapper rolls back to the
> > original table.
>
> Ah. I didn't know that, and I'm likely to forget it again. Would you
> mind adding a short comment at that point in the code?
Sure.
-Ben
>
> Otherwise, ACK.
>
> 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)
next prev parent reply other threads:[~2017-05-17 16:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 16:56 [PATCH 0/6] small multipath fixes Benjamin Marzinski
2017-05-09 16:57 ` [PATCH 1/6] libmultipath: print alias with no_path_retry message Benjamin Marzinski
2017-05-09 16:57 ` [PATCH 2/6] multipathd: force reload device on all resizes Benjamin Marzinski
2017-05-09 16:57 ` [PATCH 3/6] libmultipath: refactor calls to get dm device info Benjamin Marzinski
2017-05-11 20:26 ` Martin Wilck
2017-05-12 16:59 ` Benjamin Marzinski
2017-05-09 16:57 ` [PATCH 4/6] libmultipath: fix suspended devs from failed reloads Benjamin Marzinski
2017-05-11 20:26 ` Martin Wilck
2017-05-16 17:33 ` Benjamin Marzinski
2017-05-16 18:56 ` Martin Wilck
2017-05-17 16:25 ` Benjamin Marzinski [this message]
2017-05-09 16:57 ` [PATCH 5/6] kpartx: fix device checks Benjamin Marzinski
2017-05-11 20:30 ` Martin Wilck
2017-05-09 16:57 ` [PATCH 6/6] mpath_persist: Don't join threads that don't exist Benjamin Marzinski
2017-05-11 20:33 ` Martin Wilck
2017-05-17 22:32 ` [PATCH 0/6] small multipath fixes Christophe Varoqui
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=20170517162546.GP22856@octiron.msp.redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@redhat.com \
--cc=mwilck@suse.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.