@@ -206,6 +206,7 @@ global:
uninit_config;
update_mpp_paths;
update_multipath_strings;
+ update_multipath_table__;
update_multipath_table;
update_queue_mode_add_path;
update_queue_mode_del_path;
@@ -480,6 +480,24 @@ done:
condlog(2, "%s: no hwe found", mpp->alias);
}
+int
+update_multipath_table__ (struct multipath *mpp, vector pathvec, int flags,
+ const char *params, const char *status)
+{
+ if (disassemble_map(pathvec, params, mpp)) {
+ condlog(2, "%s: cannot disassemble map", mpp->alias);
+ return DMP_ERR;
+ }
+
+ if (disassemble_status(status, mpp))
+ condlog(2, "%s: cannot disassemble status", mpp->alias);
+
+ /* FIXME: we should deal with the return value here */
+ update_pathvec_from_dm(pathvec, mpp, flags);
+
+ return DMP_OK;
+}
+
int
update_multipath_table (struct multipath *mpp, vector pathvec, int flags)
{
@@ -506,18 +524,7 @@ update_multipath_table (struct multipath *mpp, vector pathvec, int flags)
} else if (size != mpp->size)
condlog(0, "%s: size changed from %llu to %llu", mpp->alias, size, mpp->size);
- if (disassemble_map(pathvec, params, mpp)) {
- condlog(2, "%s: cannot disassemble map", mpp->alias);
- return DMP_ERR;
- }
-
- if (disassemble_status(status, mpp))
- condlog(2, "%s: cannot disassemble status", mpp->alias);
-
- /* FIXME: we should deal with the return value here */
- update_pathvec_from_dm(pathvec, mpp, flags);
-
- return DMP_OK;
+ return update_multipath_table__(mpp, pathvec, flags, params, status);
}
static struct path *find_devt_in_pathgroups(const struct multipath *mpp,
@@ -33,6 +33,8 @@ struct multipath * add_map_with_path (struct vectors * vecs,
const struct multipath *current_mpp);
void update_queue_mode_del_path(struct multipath *mpp);
void update_queue_mode_add_path(struct multipath *mpp);
+int update_multipath_table__ (struct multipath *mpp, vector pathvec, int flags,
+ const char *params, const char *status);
int update_multipath_table (struct multipath *mpp, vector pathvec, int flags);
int update_multipath_status (struct multipath *mpp);
vector get_used_hwes(const struct _vector *pathvec);