All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benjamin Marzinski" <bmarzins@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Martin Wilck <mwilck@suse.com>
Subject: [PATCH] libmultipath: add comment about resuming
Date: Thu, 18 May 2017 16:37:40 -0500	[thread overview]
Message-ID: <1495143460-23404-1-git-send-email-bmarzins@redhat.com> (raw)

The reason for the second resume in my commit "libmultipath: fix
suspended devs from failed reloads" is not obvious from the multipath
code, so add a comment.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 libmultipath/devmapper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index 69b634b..ee83e0f 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -399,6 +399,9 @@ int dm_addmap_reload(struct multipath *mpp, char *params, int flush)
 	if (r)
 		return r;
 
+	/* If the resume failed, dm will leave the device suspended, and
+ 	 * drop the new table, so doing a second resume will try using
+ 	 * the original table */
 	if (dm_is_suspended(mpp->alias))
 		dm_simplecmd(DM_DEVICE_RESUME, mpp->alias, !flush, 1,
 			     udev_flags, 0);
-- 
1.8.3.1

             reply	other threads:[~2017-05-18 21:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 21:37 Benjamin Marzinski [this message]
2017-05-22 11:13 ` [PATCH] libmultipath: add comment about resuming 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=1495143460-23404-1-git-send-email-bmarzins@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.