/* @event_type: path event type enum @ti: pointer to a dm_target @path: string containing pathname @nr_valid_paths: number of valid paths remaining  */
void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti, const char *path, unsigned nr_valid_paths)
/* @event_type: path event type enum @ti: pointer to a dm_target @path: string containing pathname @nr_valid_paths: number of valid paths remaining  */
void dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti, const char *path, unsigned nr_valid_paths)
{
	struct mapped_device *md = dm_table_get_md(ti->table);
	struct dm_uevent *event;
	if (event_type >= ARRAY_SIZE(_dm_uevent_type_names)) {
		DMERR("%s: Invalid event_type %d", __func__, event_type);
		goto out;
	}
	event = dm_build_path_uevent(md, ti,
				     _dm_uevent_type_names[event_type].action,
				     _dm_uevent_type_names[event_type].name,
				     path, nr_valid_paths);
	if (IS_ERR(event))
		goto out;
	dm_uevent_add(md, &event->elist);
out:
	dm_put(md);
}