Commit | Line | Data |
---|---|---|
ec2c35ac LE |
1 | /* |
2 | * General overview: | |
3 | * full generic netlink message: | |
4 | * |nlmsghdr|genlmsghdr|<payload> | |
5 | * | |
6 | * payload: | |
7 | * |optional fixed size family header|<sequence of netlink attributes> | |
8 | * | |
9 | * sequence of netlink attributes: | |
10 | * I chose to have all "top level" attributes NLA_NESTED, | |
11 | * corresponding to some real struct. | |
12 | * So we have a sequence of |tla, len|<nested nla sequence> | |
13 | * | |
14 | * nested nla sequence: | |
15 | * may be empty, or contain a sequence of netlink attributes | |
16 | * representing the struct fields. | |
17 | * | |
18 | * The tag number of any field (regardless of containing struct) | |
19 | * will be available as T_ ## field_name, | |
20 | * so you cannot have the same field name in two differnt structs. | |
21 | * | |
22 | * The tag numbers themselves are per struct, though, | |
23 | * so should always begin at 1 (not 0, that is the special "NLA_UNSPEC" type, | |
24 | * which we won't use here). | |
25 | * The tag numbers are used as index in the respective nla_policy array. | |
26 | * | |
27 | * GENL_struct(tag_name, tag_number, struct name, struct fields) - struct and policy | |
28 | * genl_magic_struct.h | |
29 | * generates the struct declaration, | |
30 | * generates an entry in the tla enum, | |
31 | * genl_magic_func.h | |
32 | * generates an entry in the static tla policy | |
33 | * with .type = NLA_NESTED | |
34 | * generates the static <struct_name>_nl_policy definition, | |
35 | * and static conversion functions | |
36 | * | |
37 | * genl_magic_func.h | |
38 | * | |
39 | * GENL_mc_group(group) | |
40 | * genl_magic_struct.h | |
41 | * does nothing | |
42 | * genl_magic_func.h | |
43 | * defines and registers the mcast group, | |
44 | * and provides a send helper | |
45 | * | |
46 | * GENL_notification(op_name, op_num, mcast_group, tla list) | |
47 | * These are notifications to userspace. | |
48 | * | |
49 | * genl_magic_struct.h | |
50 | * generates an entry in the genl_ops enum, | |
51 | * genl_magic_func.h | |
52 | * does nothing | |
53 | * | |
54 | * mcast group: the name of the mcast group this notification should be | |
55 | * expected on | |
56 | * tla list: the list of expected top level attributes, | |
57 | * for documentation and sanity checking. | |
58 | * | |
59 | * GENL_op(op_name, op_num, flags and handler, tla list) - "genl operations" | |
60 | * These are requests from userspace. | |
61 | * | |
62 | * _op and _notification share the same "number space", | |
63 | * op_nr will be assigned to "genlmsghdr->cmd" | |
64 | * | |
65 | * genl_magic_struct.h | |
66 | * generates an entry in the genl_ops enum, | |
67 | * genl_magic_func.h | |
68 | * generates an entry in the static genl_ops array, | |
69 | * and static register/unregister functions to | |
70 | * genl_register_family_with_ops(). | |
71 | * | |
72 | * flags and handler: | |
73 | * GENL_op_init( .doit = x, .dumpit = y, .flags = something) | |
74 | * GENL_doit(x) => .dumpit = NULL, .flags = GENL_ADMIN_PERM | |
75 | * tla list: the list of expected top level attributes, | |
76 | * for documentation and sanity checking. | |
77 | */ | |
78 | ||
79 | /* | |
80 | * STRUCTS | |
81 | */ | |
82 | ||
83 | /* this is sent kernel -> userland on various error conditions, and contains | |
84 | * informational textual info, which is supposedly human readable. | |
85 | * The computer relevant return code is in the drbd_genlmsghdr. | |
86 | */ | |
87 | GENL_struct(DRBD_NLA_CFG_REPLY, 1, drbd_cfg_reply, | |
88 | /* "arbitrary" size strings, nla_policy.len = 0 */ | |
5f935920 | 89 | __str_field(1, DRBD_GENLA_F_MANDATORY, info_text, 0) |
ec2c35ac LE |
90 | ) |
91 | ||
92 | /* Configuration requests typically need a context to operate on. | |
93 | * Possible keys are device minor (fits in the drbd_genlmsghdr), | |
94 | * the replication link (aka connection) name, | |
95 | * and/or the replication group (aka resource) name, | |
96 | * and the volume id within the resource. */ | |
97 | GENL_struct(DRBD_NLA_CFG_CONTEXT, 2, drbd_cfg_context, | |
5f935920 | 98 | __u32_field(1, DRBD_GENLA_F_MANDATORY, ctx_volume) |
7c3063cc | 99 | __str_field(2, DRBD_GENLA_F_MANDATORY, ctx_resource_name, 128) |
ec2c35ac LE |
100 | ) |
101 | ||
102 | GENL_struct(DRBD_NLA_DISK_CONF, 3, disk_conf, | |
5f935920 AG |
103 | __str_field(1, DRBD_F_REQUIRED | DRBD_F_INVARIANT, backing_dev, 128) |
104 | __str_field(2, DRBD_F_REQUIRED | DRBD_F_INVARIANT, meta_dev, 128) | |
105 | __s32_field(3, DRBD_F_REQUIRED | DRBD_F_INVARIANT, meta_dev_idx) | |
f399002e LE |
106 | |
107 | /* use the resize command to try and change the disk_size */ | |
5f935920 | 108 | __u64_field(4, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, disk_size) |
f399002e LE |
109 | /* we could change the max_bio_bvecs, |
110 | * but it won't propagate through the stack */ | |
5f935920 AG |
111 | __u32_field(5, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, max_bio_bvecs) |
112 | ||
113 | __u32_field_def(6, DRBD_GENLA_F_MANDATORY, on_io_error, DRBD_ON_IO_ERROR_DEF) | |
114 | __u32_field_def(7, DRBD_GENLA_F_MANDATORY, fencing, DRBD_FENCING_DEF) | |
115 | ||
116 | __u32_field_def(8, DRBD_GENLA_F_MANDATORY, resync_rate, DRBD_RESYNC_RATE_DEF) | |
117 | __s32_field_def(9, DRBD_GENLA_F_MANDATORY, resync_after, DRBD_MINOR_NUMBER_DEF) | |
118 | __u32_field_def(10, DRBD_GENLA_F_MANDATORY, al_extents, DRBD_AL_EXTENTS_DEF) | |
119 | __u32_field_def(11, DRBD_GENLA_F_MANDATORY, c_plan_ahead, DRBD_C_PLAN_AHEAD_DEF) | |
120 | __u32_field_def(12, DRBD_GENLA_F_MANDATORY, c_delay_target, DRBD_C_DELAY_TARGET_DEF) | |
121 | __u32_field_def(13, DRBD_GENLA_F_MANDATORY, c_fill_target, DRBD_C_FILL_TARGET_DEF) | |
122 | __u32_field_def(14, DRBD_GENLA_F_MANDATORY, c_max_rate, DRBD_C_MAX_RATE_DEF) | |
123 | __u32_field_def(15, DRBD_GENLA_F_MANDATORY, c_min_rate, DRBD_C_MIN_RATE_DEF) | |
124 | ||
125 | __flg_field_def(16, DRBD_GENLA_F_MANDATORY, disk_barrier, DRBD_DISK_BARRIER_DEF) | |
126 | __flg_field_def(17, DRBD_GENLA_F_MANDATORY, disk_flushes, DRBD_DISK_FLUSHES_DEF) | |
127 | __flg_field_def(18, DRBD_GENLA_F_MANDATORY, disk_drain, DRBD_DISK_DRAIN_DEF) | |
128 | __flg_field_def(19, DRBD_GENLA_F_MANDATORY, md_flushes, DRBD_MD_FLUSHES_DEF) | |
ec2c35ac LE |
129 | ) |
130 | ||
f399002e | 131 | GENL_struct(DRBD_NLA_RESOURCE_OPTS, 4, res_opts, |
5f935920 AG |
132 | __str_field_def(1, DRBD_GENLA_F_MANDATORY, cpu_mask, 32) |
133 | __u32_field_def(2, DRBD_GENLA_F_MANDATORY, on_no_data, DRBD_ON_NO_DATA_DEF) | |
ec2c35ac LE |
134 | ) |
135 | ||
136 | GENL_struct(DRBD_NLA_NET_CONF, 5, net_conf, | |
5f935920 AG |
137 | __bin_field(1, DRBD_F_REQUIRED | DRBD_F_INVARIANT, my_addr, 128) |
138 | __bin_field(2, DRBD_F_REQUIRED | DRBD_F_INVARIANT, peer_addr, 128) | |
139 | __str_field_def(3, DRBD_GENLA_F_MANDATORY | DRBD_F_SENSITIVE, | |
ec2c35ac | 140 | shared_secret, SHARED_SECRET_MAX) |
5f935920 AG |
141 | __str_field_def(4, DRBD_GENLA_F_MANDATORY, cram_hmac_alg, SHARED_SECRET_MAX) |
142 | __str_field_def(5, DRBD_GENLA_F_MANDATORY, integrity_alg, SHARED_SECRET_MAX) | |
143 | __str_field_def(6, DRBD_GENLA_F_MANDATORY, verify_alg, SHARED_SECRET_MAX) | |
144 | __str_field_def(7, DRBD_GENLA_F_MANDATORY, csums_alg, SHARED_SECRET_MAX) | |
145 | __u32_field_def(8, DRBD_GENLA_F_MANDATORY, wire_protocol, DRBD_PROTOCOL_DEF) | |
146 | __u32_field_def(9, DRBD_GENLA_F_MANDATORY, connect_int, DRBD_CONNECT_INT_DEF) | |
147 | __u32_field_def(10, DRBD_GENLA_F_MANDATORY, timeout, DRBD_TIMEOUT_DEF) | |
148 | __u32_field_def(11, DRBD_GENLA_F_MANDATORY, ping_int, DRBD_PING_INT_DEF) | |
149 | __u32_field_def(12, DRBD_GENLA_F_MANDATORY, ping_timeo, DRBD_PING_TIMEO_DEF) | |
150 | __u32_field_def(13, DRBD_GENLA_F_MANDATORY, sndbuf_size, DRBD_SNDBUF_SIZE_DEF) | |
151 | __u32_field_def(14, DRBD_GENLA_F_MANDATORY, rcvbuf_size, DRBD_RCVBUF_SIZE_DEF) | |
152 | __u32_field_def(15, DRBD_GENLA_F_MANDATORY, ko_count, DRBD_KO_COUNT_DEF) | |
153 | __u32_field_def(16, DRBD_GENLA_F_MANDATORY, max_buffers, DRBD_MAX_BUFFERS_DEF) | |
154 | __u32_field_def(17, DRBD_GENLA_F_MANDATORY, max_epoch_size, DRBD_MAX_EPOCH_SIZE_DEF) | |
155 | __u32_field_def(18, DRBD_GENLA_F_MANDATORY, unplug_watermark, DRBD_UNPLUG_WATERMARK_DEF) | |
156 | __u32_field_def(19, DRBD_GENLA_F_MANDATORY, after_sb_0p, DRBD_AFTER_SB_0P_DEF) | |
157 | __u32_field_def(20, DRBD_GENLA_F_MANDATORY, after_sb_1p, DRBD_AFTER_SB_1P_DEF) | |
158 | __u32_field_def(21, DRBD_GENLA_F_MANDATORY, after_sb_2p, DRBD_AFTER_SB_2P_DEF) | |
159 | __u32_field_def(22, DRBD_GENLA_F_MANDATORY, rr_conflict, DRBD_RR_CONFLICT_DEF) | |
160 | __u32_field_def(23, DRBD_GENLA_F_MANDATORY, on_congestion, DRBD_ON_CONGESTION_DEF) | |
161 | __u32_field_def(24, DRBD_GENLA_F_MANDATORY, cong_fill, DRBD_CONG_FILL_DEF) | |
162 | __u32_field_def(25, DRBD_GENLA_F_MANDATORY, cong_extents, DRBD_CONG_EXTENTS_DEF) | |
163 | __flg_field_def(26, DRBD_GENLA_F_MANDATORY, two_primaries, DRBD_ALLOW_TWO_PRIMARIES_DEF) | |
164 | __flg_field(27, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, discard_my_data) | |
165 | __flg_field_def(28, DRBD_GENLA_F_MANDATORY, tcp_cork, DRBD_TCP_CORK_DEF) | |
166 | __flg_field_def(29, DRBD_GENLA_F_MANDATORY, always_asbp, DRBD_ALWAYS_ASBP_DEF) | |
167 | __flg_field(30, DRBD_GENLA_F_MANDATORY | DRBD_F_INVARIANT, dry_run) | |
168 | __flg_field_def(31, DRBD_GENLA_F_MANDATORY, use_rle, DRBD_USE_RLE_DEF) | |
ec2c35ac LE |
169 | ) |
170 | ||
171 | GENL_struct(DRBD_NLA_SET_ROLE_PARMS, 6, set_role_parms, | |
5f935920 | 172 | __flg_field(1, DRBD_GENLA_F_MANDATORY, assume_uptodate) |
ec2c35ac LE |
173 | ) |
174 | ||
175 | GENL_struct(DRBD_NLA_RESIZE_PARMS, 7, resize_parms, | |
5f935920 AG |
176 | __u64_field(1, DRBD_GENLA_F_MANDATORY, resize_size) |
177 | __flg_field(2, DRBD_GENLA_F_MANDATORY, resize_force) | |
178 | __flg_field(3, DRBD_GENLA_F_MANDATORY, no_resync) | |
ec2c35ac LE |
179 | ) |
180 | ||
181 | GENL_struct(DRBD_NLA_STATE_INFO, 8, state_info, | |
182 | /* the reason of the broadcast, | |
183 | * if this is an event triggered broadcast. */ | |
5f935920 AG |
184 | __u32_field(1, DRBD_GENLA_F_MANDATORY, sib_reason) |
185 | __u32_field(2, DRBD_F_REQUIRED, current_state) | |
186 | __u64_field(3, DRBD_GENLA_F_MANDATORY, capacity) | |
187 | __u64_field(4, DRBD_GENLA_F_MANDATORY, ed_uuid) | |
ec2c35ac LE |
188 | |
189 | /* These are for broadcast from after state change work. | |
190 | * prev_state and new_state are from the moment the state change took | |
191 | * place, new_state is not neccessarily the same as current_state, | |
192 | * there may have been more state changes since. Which will be | |
193 | * broadcasted soon, in their respective after state change work. */ | |
5f935920 AG |
194 | __u32_field(5, DRBD_GENLA_F_MANDATORY, prev_state) |
195 | __u32_field(6, DRBD_GENLA_F_MANDATORY, new_state) | |
ec2c35ac LE |
196 | |
197 | /* if we have a local disk: */ | |
5f935920 AG |
198 | __bin_field(7, DRBD_GENLA_F_MANDATORY, uuids, (UI_SIZE*sizeof(__u64))) |
199 | __u32_field(8, DRBD_GENLA_F_MANDATORY, disk_flags) | |
200 | __u64_field(9, DRBD_GENLA_F_MANDATORY, bits_total) | |
201 | __u64_field(10, DRBD_GENLA_F_MANDATORY, bits_oos) | |
ec2c35ac | 202 | /* and in case resync or online verify is active */ |
5f935920 AG |
203 | __u64_field(11, DRBD_GENLA_F_MANDATORY, bits_rs_total) |
204 | __u64_field(12, DRBD_GENLA_F_MANDATORY, bits_rs_failed) | |
ec2c35ac LE |
205 | |
206 | /* for pre and post notifications of helper execution */ | |
5f935920 AG |
207 | __str_field(13, DRBD_GENLA_F_MANDATORY, helper, 32) |
208 | __u32_field(14, DRBD_GENLA_F_MANDATORY, helper_exit_code) | |
ec2c35ac LE |
209 | ) |
210 | ||
211 | GENL_struct(DRBD_NLA_START_OV_PARMS, 9, start_ov_parms, | |
5f935920 | 212 | __u64_field(1, DRBD_GENLA_F_MANDATORY, ov_start_sector) |
ec2c35ac LE |
213 | ) |
214 | ||
215 | GENL_struct(DRBD_NLA_NEW_C_UUID_PARMS, 10, new_c_uuid_parms, | |
5f935920 | 216 | __flg_field(1, DRBD_GENLA_F_MANDATORY, clear_bm) |
ec2c35ac LE |
217 | ) |
218 | ||
219 | GENL_struct(DRBD_NLA_TIMEOUT_PARMS, 11, timeout_parms, | |
5f935920 | 220 | __u32_field(1, DRBD_F_REQUIRED, timeout_type) |
ec2c35ac LE |
221 | ) |
222 | ||
223 | GENL_struct(DRBD_NLA_DISCONNECT_PARMS, 12, disconnect_parms, | |
5f935920 | 224 | __flg_field(1, DRBD_GENLA_F_MANDATORY, force_disconnect) |
ec2c35ac LE |
225 | ) |
226 | ||
227 | /* | |
228 | * Notifications and commands (genlmsghdr->cmd) | |
229 | */ | |
230 | GENL_mc_group(events) | |
231 | ||
232 | /* kernel -> userspace announcement of changes */ | |
233 | GENL_notification( | |
234 | DRBD_EVENT, 1, events, | |
5f935920 AG |
235 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
236 | GENL_tla_expected(DRBD_NLA_STATE_INFO, DRBD_F_REQUIRED) | |
237 | GENL_tla_expected(DRBD_NLA_NET_CONF, DRBD_GENLA_F_MANDATORY) | |
238 | GENL_tla_expected(DRBD_NLA_DISK_CONF, DRBD_GENLA_F_MANDATORY) | |
239 | GENL_tla_expected(DRBD_NLA_SYNCER_CONF, DRBD_GENLA_F_MANDATORY) | |
ec2c35ac LE |
240 | ) |
241 | ||
242 | /* query kernel for specific or all info */ | |
243 | GENL_op( | |
244 | DRBD_ADM_GET_STATUS, 2, | |
245 | GENL_op_init( | |
246 | .doit = drbd_adm_get_status, | |
247 | .dumpit = drbd_adm_get_status_all, | |
248 | /* anyone may ask for the status, | |
249 | * it is broadcasted anyways */ | |
250 | ), | |
251 | /* To select the object .doit. | |
252 | * Or a subset of objects in .dumpit. */ | |
5f935920 | 253 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_GENLA_F_MANDATORY) |
ec2c35ac LE |
254 | ) |
255 | ||
ec2c35ac | 256 | /* add DRBD minor devices as volumes to resources */ |
789c1b62 | 257 | GENL_op(DRBD_ADM_NEW_MINOR, 5, GENL_doit(drbd_adm_add_minor), |
5f935920 | 258 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 259 | GENL_op(DRBD_ADM_DEL_MINOR, 6, GENL_doit(drbd_adm_delete_minor), |
5f935920 | 260 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 261 | |
789c1b62 AG |
262 | /* add or delete resources */ |
263 | GENL_op(DRBD_ADM_NEW_RESOURCE, 7, GENL_doit(drbd_adm_new_resource), | |
5f935920 | 264 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
789c1b62 | 265 | GENL_op(DRBD_ADM_DEL_RESOURCE, 8, GENL_doit(drbd_adm_del_resource), |
5f935920 | 266 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 267 | |
f399002e LE |
268 | GENL_op(DRBD_ADM_RESOURCE_OPTS, 9, |
269 | GENL_doit(drbd_adm_resource_opts), | |
5f935920 AG |
270 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
271 | GENL_tla_expected(DRBD_NLA_RESOURCE_OPTS, DRBD_GENLA_F_MANDATORY) | |
ec2c35ac LE |
272 | ) |
273 | ||
274 | GENL_op( | |
275 | DRBD_ADM_CONNECT, 10, | |
276 | GENL_doit(drbd_adm_connect), | |
5f935920 AG |
277 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
278 | GENL_tla_expected(DRBD_NLA_NET_CONF, DRBD_F_REQUIRED) | |
ec2c35ac LE |
279 | ) |
280 | ||
f399002e LE |
281 | GENL_op( |
282 | DRBD_ADM_CHG_NET_OPTS, 29, | |
283 | GENL_doit(drbd_adm_net_opts), | |
5f935920 AG |
284 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
285 | GENL_tla_expected(DRBD_NLA_NET_CONF, DRBD_F_REQUIRED) | |
f399002e LE |
286 | ) |
287 | ||
ec2c35ac | 288 | GENL_op(DRBD_ADM_DISCONNECT, 11, GENL_doit(drbd_adm_disconnect), |
5f935920 | 289 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 290 | |
ec2c35ac LE |
291 | GENL_op(DRBD_ADM_ATTACH, 12, |
292 | GENL_doit(drbd_adm_attach), | |
5f935920 AG |
293 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
294 | GENL_tla_expected(DRBD_NLA_DISK_CONF, DRBD_F_REQUIRED) | |
ec2c35ac LE |
295 | ) |
296 | ||
f399002e LE |
297 | GENL_op(DRBD_ADM_CHG_DISK_OPTS, 28, |
298 | GENL_doit(drbd_adm_disk_opts), | |
5f935920 AG |
299 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
300 | GENL_tla_expected(DRBD_NLA_DISK_OPTS, DRBD_F_REQUIRED) | |
f399002e LE |
301 | ) |
302 | ||
ec2c35ac LE |
303 | GENL_op( |
304 | DRBD_ADM_RESIZE, 13, | |
305 | GENL_doit(drbd_adm_resize), | |
5f935920 AG |
306 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
307 | GENL_tla_expected(DRBD_NLA_RESIZE_PARMS, DRBD_GENLA_F_MANDATORY) | |
ec2c35ac LE |
308 | ) |
309 | ||
ec2c35ac LE |
310 | GENL_op( |
311 | DRBD_ADM_PRIMARY, 14, | |
312 | GENL_doit(drbd_adm_set_role), | |
5f935920 AG |
313 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
314 | GENL_tla_expected(DRBD_NLA_SET_ROLE_PARMS, DRBD_F_REQUIRED) | |
ec2c35ac LE |
315 | ) |
316 | ||
317 | GENL_op( | |
318 | DRBD_ADM_SECONDARY, 15, | |
319 | GENL_doit(drbd_adm_set_role), | |
5f935920 AG |
320 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
321 | GENL_tla_expected(DRBD_NLA_SET_ROLE_PARMS, DRBD_F_REQUIRED) | |
ec2c35ac LE |
322 | ) |
323 | ||
324 | GENL_op( | |
325 | DRBD_ADM_NEW_C_UUID, 16, | |
326 | GENL_doit(drbd_adm_new_c_uuid), | |
5f935920 AG |
327 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED) |
328 | GENL_tla_expected(DRBD_NLA_NEW_C_UUID_PARMS, DRBD_GENLA_F_MANDATORY) | |
ec2c35ac LE |
329 | ) |
330 | ||
331 | GENL_op( | |
332 | DRBD_ADM_START_OV, 17, | |
333 | GENL_doit(drbd_adm_start_ov), | |
5f935920 | 334 | GENL_tla_expected(DRBD_NLA_START_OV_PARMS, DRBD_GENLA_F_MANDATORY) |
ec2c35ac LE |
335 | ) |
336 | ||
337 | GENL_op(DRBD_ADM_DETACH, 18, GENL_doit(drbd_adm_detach), | |
5f935920 | 338 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 339 | GENL_op(DRBD_ADM_INVALIDATE, 19, GENL_doit(drbd_adm_invalidate), |
5f935920 | 340 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 341 | GENL_op(DRBD_ADM_INVAL_PEER, 20, GENL_doit(drbd_adm_invalidate_peer), |
5f935920 | 342 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 343 | GENL_op(DRBD_ADM_PAUSE_SYNC, 21, GENL_doit(drbd_adm_pause_sync), |
5f935920 | 344 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 345 | GENL_op(DRBD_ADM_RESUME_SYNC, 22, GENL_doit(drbd_adm_resume_sync), |
5f935920 | 346 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 347 | GENL_op(DRBD_ADM_SUSPEND_IO, 23, GENL_doit(drbd_adm_suspend_io), |
5f935920 | 348 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 349 | GENL_op(DRBD_ADM_RESUME_IO, 24, GENL_doit(drbd_adm_resume_io), |
5f935920 | 350 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 351 | GENL_op(DRBD_ADM_OUTDATE, 25, GENL_doit(drbd_adm_outdate), |
5f935920 | 352 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
ec2c35ac | 353 | GENL_op(DRBD_ADM_GET_TIMEOUT_TYPE, 26, GENL_doit(drbd_adm_get_timeout_type), |
5f935920 | 354 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |
85f75dd7 | 355 | GENL_op(DRBD_ADM_DOWN, 27, GENL_doit(drbd_adm_down), |
5f935920 | 356 | GENL_tla_expected(DRBD_NLA_CFG_CONTEXT, DRBD_F_REQUIRED)) |