diff mbox

[1/5] libmultipath: add comment about resuming

Message ID 1496372952-27110-2-git-send-email-bmarzins@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Benjamin Marzinski June 2, 2017, 3:09 a.m. UTC
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 mbox

Patch

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);