@@ -31,7 +31,7 @@
* The new version inherits the previous ones.
*/
-LIBMULTIPATH_10.0.0 {
+LIBMULTIPATH_11.0.0 {
global:
/* symbols referenced by multipath and multipathd */
add_foreign;
@@ -318,6 +318,7 @@ struct path {
int fd;
int initialized;
int retriggers;
+ int partial_retrigger_delay;
unsigned int path_failures;
time_t dis_reinstate_time;
int disable_reinstate;
@@ -195,6 +195,7 @@ bool update_pathvec_from_dm(vector pathvec, struct multipath *mpp,
condlog(2, "%s: adding new path %s",
mpp->alias, pp->dev);
pp->initialized = INIT_PARTIAL;
+ pp->partial_retrigger_delay = 180;
store_path(pathvec, pp);
pp->tick = 1;
}
@@ -1948,6 +1948,25 @@ retry_count_tick(vector mpvec)
}
}
+static void
+partial_retrigger_tick(vector pathvec)
+{
+ struct path *pp;
+ unsigned int i;
+
+ vector_foreach_slot (pathvec, pp, i) {
+ if (pp->initialized == INIT_PARTIAL && pp->udev &&
+ pp->partial_retrigger_delay > 0 &&
+ --pp->partial_retrigger_delay == 0) {
+ const char *msg = udev_device_get_is_initialized(pp->udev) ?
+ "change" : "add";
+
+ sysfs_attr_set_value(pp->udev, "uevent", msg,
+ strlen(msg));
+ }
+ }
+}
+
int update_prio(struct path *pp, int refresh_all)
{
int oldpriority;
@@ -2566,6 +2585,7 @@ checkerloop (void *ap)
retry_count_tick(vecs->mpvec);
missing_uev_wait_tick(vecs);
ghost_delay_tick(vecs);
+ partial_retrigger_tick(vecs->pathvec);
lock_cleanup_pop(vecs->lock);
if (count)
If a partial path appears and is not fully initialized within 180 seconds, trigger a uevent. If the udev device is not initialized trigger an add event. Otherwise, trigger a change event. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> --- libmultipath/libmultipath.version | 2 +- libmultipath/structs.h | 1 + libmultipath/structs_vec.c | 1 + multipathd/main.c | 20 ++++++++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-)