libmultipath: add comment about resuming
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 2 Jun 2017 03:09:08 +0000 (22:09 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 21 Jun 2017 10:05:54 +0000 (12:05 +0200)
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

index 69b634b..ee83e0f 100644 (file)
@@ -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);