Skip to contentSkip to conversation

libmultipath: add comment about resuming

PATCH In review Benjamin Marzinski 2 participants 2 messages May 18, 2017 – May 22, 2017 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/1 libmultipath: add comment about resuming

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.

---
 libmultipath/devmapper.c | 3 +++
 1 file changed, 3 insertions(+)
libmultipath/devmapper.c +3 -0
index 69b634b..ee83e0f 100644
@@ -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);
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 3 lines · Benjamin Marzinski

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.

Nice, thank you.

Martin

Signature · 8 lines
Dr. Martin Wilck <[email protected]>, 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
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel