blob: d30d226f2a181390a3d354438299bf827cbcfc7d [file] [log] [blame]
Thomas Gleixner1a59d1b82019-05-27 08:55:05 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Mike Anderson51e5b2b2007-10-19 22:48:00 +01002/*
3 * Device Mapper Uevent Support
4 *
Mike Anderson51e5b2b2007-10-19 22:48:00 +01005 * Copyright IBM Corporation, 2007
6 * Author: Mike Anderson <andmike@linux.vnet.ibm.com>
7 */
8#ifndef DM_UEVENT_H
9#define DM_UEVENT_H
10
Mike Anderson7a8c3d32007-10-19 22:48:01 +010011enum dm_uevent_type {
12 DM_UEVENT_PATH_FAILED,
13 DM_UEVENT_PATH_REINSTATED,
14};
15
Mike Anderson51e5b2b2007-10-19 22:48:00 +010016#ifdef CONFIG_DM_UEVENT
17
18extern int dm_uevent_init(void);
19extern void dm_uevent_exit(void);
Mike Anderson7a8c3d32007-10-19 22:48:01 +010020extern void dm_send_uevents(struct list_head *events, struct kobject *kobj);
21extern void dm_path_uevent(enum dm_uevent_type event_type,
22 struct dm_target *ti, const char *path,
23 unsigned nr_valid_paths);
Mike Anderson51e5b2b2007-10-19 22:48:00 +010024
25#else
26
27static inline int dm_uevent_init(void)
28{
29 return 0;
30}
31static inline void dm_uevent_exit(void)
32{
33}
Mike Anderson7a8c3d32007-10-19 22:48:01 +010034static inline void dm_send_uevents(struct list_head *events,
35 struct kobject *kobj)
36{
37}
38static inline void dm_path_uevent(enum dm_uevent_type event_type,
39 struct dm_target *ti, const char *path,
40 unsigned nr_valid_paths)
41{
42}
Mike Anderson51e5b2b2007-10-19 22:48:00 +010043
44#endif /* CONFIG_DM_UEVENT */
45
46#endif /* DM_UEVENT_H */