1
2#ifndef DRBD_STATE_CHANGE_H
3#define DRBD_STATE_CHANGE_H
4
5struct drbd_resource_state_change {
6 struct drbd_resource *resource;
7 enum drbd_role role[2];
8 bool susp[2];
9 bool susp_nod[2];
10 bool susp_fen[2];
11};
12
13struct drbd_device_state_change {
14 struct drbd_device *device;
15 enum drbd_disk_state disk_state[2];
16};
17
18struct drbd_connection_state_change {
19 struct drbd_connection *connection;
20 enum drbd_conns cstate[2];
21 enum drbd_role peer_role[2];
22};
23
24struct drbd_peer_device_state_change {
25 struct drbd_peer_device *peer_device;
26 enum drbd_disk_state disk_state[2];
27 enum drbd_conns repl_state[2];
28 bool resync_susp_user[2];
29 bool resync_susp_peer[2];
30 bool resync_susp_dependency[2];
31};
32
33struct drbd_state_change {
34 struct list_head list;
35 unsigned int n_devices;
36 unsigned int n_connections;
37 struct drbd_resource_state_change resource[1];
38 struct drbd_device_state_change *devices;
39 struct drbd_connection_state_change *connections;
40 struct drbd_peer_device_state_change *peer_devices;
41};
42
43extern struct drbd_state_change *remember_old_state(struct drbd_resource *, gfp_t);
44extern void copy_old_to_new_state_change(struct drbd_state_change *);
45extern void forget_state_change(struct drbd_state_change *);
46
47extern void notify_resource_state_change(struct sk_buff *,
48 unsigned int,
49 struct drbd_resource_state_change *,
50 enum drbd_notification_type type);
51extern void notify_connection_state_change(struct sk_buff *,
52 unsigned int,
53 struct drbd_connection_state_change *,
54 enum drbd_notification_type type);
55extern void notify_device_state_change(struct sk_buff *,
56 unsigned int,
57 struct drbd_device_state_change *,
58 enum drbd_notification_type type);
59extern void notify_peer_device_state_change(struct sk_buff *,
60 unsigned int,
61 struct drbd_peer_device_state_change *,
62 enum drbd_notification_type type);
63
64#endif
65