Lines Matching full:event

39 static void dm_uevent_free(struct dm_uevent *event)  in dm_uevent_free()  argument
41 kmem_cache_free(_dm_event_cache, event); in dm_uevent_free()
46 struct dm_uevent *event; in dm_uevent_alloc() local
48 event = kmem_cache_zalloc(_dm_event_cache, GFP_ATOMIC); in dm_uevent_alloc()
49 if (!event) in dm_uevent_alloc()
52 INIT_LIST_HEAD(&event->elist); in dm_uevent_alloc()
53 event->md = md; in dm_uevent_alloc()
55 return event; in dm_uevent_alloc()
65 struct dm_uevent *event; in dm_build_path_uevent() local
67 event = dm_uevent_alloc(md); in dm_build_path_uevent()
68 if (!event) { in dm_build_path_uevent()
73 event->action = action; in dm_build_path_uevent()
75 if (add_uevent_var(&event->ku_env, "DM_TARGET=%s", ti->type->name)) { in dm_build_path_uevent()
81 if (add_uevent_var(&event->ku_env, "DM_ACTION=%s", dm_action)) { in dm_build_path_uevent()
87 if (add_uevent_var(&event->ku_env, "DM_SEQNUM=%u", in dm_build_path_uevent()
94 if (add_uevent_var(&event->ku_env, "DM_PATH=%s", path)) { in dm_build_path_uevent()
99 if (add_uevent_var(&event->ku_env, "DM_NR_VALID_PATHS=%d", in dm_build_path_uevent()
106 return event; in dm_build_path_uevent()
109 dm_uevent_free(event); in dm_build_path_uevent()
118 * @kobj: kobject generating event
124 struct dm_uevent *event, *next; in dm_send_uevents() local
126 list_for_each_entry_safe(event, next, events, elist) { in dm_send_uevents()
127 list_del_init(&event->elist); in dm_send_uevents()
133 if (dm_copy_name_and_uuid(event->md, event->name, in dm_send_uevents()
134 event->uuid)) { in dm_send_uevents()
140 if (add_uevent_var(&event->ku_env, "DM_NAME=%s", event->name)) { in dm_send_uevents()
146 if (add_uevent_var(&event->ku_env, "DM_UUID=%s", event->uuid)) { in dm_send_uevents()
152 r = kobject_uevent_env(kobj, event->action, event->ku_env.envp); in dm_send_uevents()
156 dm_uevent_free(event); in dm_send_uevents()
162 * dm_path_uevent - called to create a new path event and queue it
164 * @event_type: path event type enum
174 struct dm_uevent *event; in dm_path_uevent() local
181 event = dm_build_path_uevent(md, ti, in dm_path_uevent()
185 if (IS_ERR(event)) in dm_path_uevent()
188 dm_uevent_add(md, &event->elist); in dm_path_uevent()