design.txt revision 1.2.4.2 1 1.2.4.2 skrll Device-mapper to libdevmapper protocol
2 1.2.4.2 skrll
3 1.2.4.2 skrll
4 1.2.4.2 skrll
5 1.2.4.2 skrll 1) Device mapper device in a POV of LVM it is an Logical Volume.
6 1.2.4.2 skrll Logical Volume is virtual block device is made from logical blocks.
7 1.2.4.2 skrll These blocks are mapped to real device blocks with algorithm called
8 1.2.4.2 skrll target.
9 1.2.4.2 skrll
10 1.2.4.2 skrll Functions available to dm device:
11 1.2.4.2 skrll create, remove, list, status of device.
12 1.2.4.2 skrll
13 1.2.4.2 skrll 2) device mapper target is function which defines how are Logical blocks
14 1.2.4.2 skrll mapped to physical. There are many targets linear, stripe, mirror etc.
15 1.2.4.2 skrll
16 1.2.4.2 skrll Functions available to dm device:
17 1.2.4.2 skrll list available targets. They can be added with module in linux.
18 1.2.4.2 skrll
19 1.2.4.2 skrll 3) dm table.
20 1.2.4.2 skrll Every device-mapper device consits from one or more tables. Table specify
21 1.2.4.2 skrll Start, length of logical blocks and target which is used to map them to
22 1.2.4.2 skrll physical blocks.
23 1.2.4.2 skrll
24 1.2.4.2 skrll {start} {length} {target} | {device} {target parameters}
25 1.2.4.2 skrll
26 1.2.4.2 skrll after | are target specific parameters listed.
27 1.2.4.2 skrll
28 1.2.4.2 skrll Functions available to dm device:
29 1.2.4.2 skrll load, unload, table_status.
30 1.2.4.2 skrll
31 1.2.4.2 skrll
32 1.2.4.2 skrll List of available ioct calls
33 1.2.4.2 skrll
34 1.2.4.2 skrll DM_VERSION
35 1.2.4.2 skrll DM_REMOVE_ALL
36 1.2.4.2 skrll DM_LIST_DEVICES
37 1.2.4.2 skrll DM_DEV_CREATE
38 1.2.4.2 skrll DM_DEV_REMOVE
39 1.2.4.2 skrll DM_DEV_RENAME
40 1.2.4.2 skrll DM_DEV_SUSPEND
41 1.2.4.2 skrll DM_DEV_STATUS
42 1.2.4.2 skrll DM_DEV_WAIT
43 1.2.4.2 skrll DM_TABLE_LOAD
44 1.2.4.2 skrll DM_TABLE_CLEAR
45 1.2.4.2 skrll DM_TABLE_DEPS
46 1.2.4.2 skrll DM_TABLE_STATUS
47 1.2.4.2 skrll DM_LIST_VERSIONS
48 1.2.4.2 skrll DM_TARGET_MSG
49 1.2.4.2 skrll DM_DEV_SET_GEOMETRY
50 1.2.4.2 skrll
51 1.2.4.2 skrll 1) DM_VERSION
52 1.2.4.2 skrll
53 1.2.4.2 skrll in: struct dm-ioctl
54 1.2.4.2 skrll
55 1.2.4.2 skrll out: struct dm-ioctl
56 1.2.4.2 skrll
57 1.2.4.2 skrll Fuction:
58 1.2.4.2 skrll sends libdevmapper ioctl protocol version to kernel and ask for kernel version.
59 1.2.4.2 skrll If major and minor numbers are good we can continue.
60 1.2.4.2 skrll
61 1.2.4.2 skrll 2) DM_REMOVE_ALL
62 1.2.4.2 skrll
63 1.2.4.2 skrll in: none
64 1.2.4.2 skrll
65 1.2.4.2 skrll out: none
66 1.2.4.2 skrll
67 1.2.4.2 skrll Function:
68 1.2.4.2 skrll This ioctl will remove all DM devices/tables from DM driver.
69 1.2.4.2 skrll
70 1.2.4.2 skrll 3) DM_LIST_DEVICES
71 1.2.4.2 skrll
72 1.2.4.2 skrll in: none
73 1.2.4.2 skrll
74 1.2.4.2 skrll out: List of structures describing all devices created in driver.
75 1.2.4.2 skrll
76 1.2.4.2 skrll Function:
77 1.2.4.2 skrll List all devices created in driver. (linux use struct dm_name_list)
78 1.2.4.2 skrll
79 1.2.4.2 skrll Implementation:
80 1.2.4.2 skrll Kernel driver will place list of struct dm_name_list behind
81 1.2.4.2 skrll struct dm_ioctl in userspace. Kernel driver will list through
82 1.2.4.2 skrll the all devices and copyout info about them.
83 1.2.4.2 skrll
84 1.2.4.2 skrll 4) DM_DEV_CREATE
85 1.2.4.2 skrll
86 1.2.4.2 skrll in: struct dm-ioctl(name/uuid)
87 1.2.4.2 skrll
88 1.2.4.2 skrll out: none
89 1.2.4.2 skrll
90 1.2.4.2 skrll Function:
91 1.2.4.2 skrll Create device in dm driver, with specified name/uuid(uuid is prefered).
92 1.2.4.2 skrll (linux use struct dm_name_list)
93 1.2.4.2 skrll
94 1.2.4.2 skrll 5) DM_DEV_REMOVE
95 1.2.4.2 skrll
96 1.2.4.2 skrll in: struct dm-ioctl(name/uuid)
97 1.2.4.2 skrll
98 1.2.4.2 skrll out: none
99 1.2.4.2 skrll
100 1.2.4.2 skrll Function:
101 1.2.4.2 skrll Remove device from dm driver list, also remove device tables.
102 1.2.4.2 skrll
103 1.2.4.2 skrll 6) DM_DEV_RENAME
104 1.2.4.2 skrll
105 1.2.4.2 skrll in: struct dm-ioctl(name/uuid) and string found after dm-ioctl struct in buffer
106 1.2.4.2 skrll
107 1.2.4.2 skrll out: none
108 1.2.4.2 skrll
109 1.2.4.2 skrll Function:
110 1.2.4.2 skrll Rename device from name to string.
111 1.2.4.2 skrll
112 1.2.4.2 skrll Implementation:
113 1.2.4.2 skrll Kernel driver will find device with name from struct dm_ioctl-name/uuid.
114 1.2.4.2 skrll Change name of selected device to string foun behind struc dm_ioctl header
115 1.2.4.2 skrll in userspace buffer.
116 1.2.4.2 skrll
117 1.2.4.2 skrll 7) DM_DEV_SUSPEND
118 1.2.4.2 skrll
119 1.2.4.2 skrll in: dm-ioctl(name/uuid)
120 1.2.4.2 skrll
121 1.2.4.2 skrll out: none
122 1.2.4.2 skrll
123 1.2.4.2 skrll Function:
124 1.2.4.2 skrll Suspend all io's on device, after this ioctl. Already started io's will be done.
125 1.2.4.2 skrll Newer can't be started.
126 1.2.4.2 skrll
127 1.2.4.2 skrll 8) DM_DEV_STATUS
128 1.2.4.2 skrll
129 1.2.4.2 skrll in: dm-ioctl(name/uuid)
130 1.2.4.2 skrll
131 1.2.4.2 skrll out: dm-ioctl (minor,open_count,target_count)
132 1.2.4.2 skrll
133 1.2.4.2 skrll Function:
134 1.2.4.2 skrll Return status info about selected device
135 1.2.4.2 skrll
136 1.2.4.2 skrll Implementation:
137 1.2.4.2 skrll Kernel driver will find device with name from struct dm_ioctl-name/uuid.
138 1.2.4.2 skrll Change values minor,open_count,target_count in dm_ioctl struct for
139 1.2.4.2 skrll selected device.
140 1.2.4.2 skrll
141 1.2.4.2 skrll 9) DM_DEV_WAIT
142 1.2.4.2 skrll
143 1.2.4.2 skrll in: dm-ioctl(name/uuid)
144 1.2.4.2 skrll
145 1.2.4.2 skrll out: none
146 1.2.4.2 skrll
147 1.2.4.2 skrll Function:
148 1.2.4.2 skrll Wait for device event to happen.
149 1.2.4.2 skrll
150 1.2.4.2 skrll 10) DM_TABLE_LOAD
151 1.2.4.2 skrll
152 1.2.4.2 skrll in: dm-ioctl(name/uuid),table specification
153 1.2.4.2 skrll
154 1.2.4.2 skrll out: none
155 1.2.4.2 skrll
156 1.2.4.2 skrll Function:
157 1.2.4.2 skrll Load table to selected device. Table is loaded to unused slot and than switched.
158 1.2.4.2 skrll (linux use struct dm_target_spec)
159 1.2.4.2 skrll
160 1.2.4.2 skrll Implementation:
161 1.2.4.2 skrll Kernel driver will find device with name from struct dm_ioctl-name/uuid.
162 1.2.4.2 skrll Table is added to the inactive slot. Every device can have more than one
163 1.2.4.2 skrll table loaded. Tables are stored in SLIST. This ioctl also open physical
164 1.2.4.2 skrll device spedcified in table and add it to dm_device specific pdev list.
165 1.2.4.2 skrll
166 1.2.4.2 skrll 11) DM_TABLE_CLEAR
167 1.2.4.2 skrll
168 1.2.4.2 skrll in: dm-ioctl(name/uuid)
169 1.2.4.2 skrll
170 1.2.4.2 skrll out: none
171 1.2.4.2 skrll
172 1.2.4.2 skrll Function:
173 1.2.4.2 skrll Remove table from unused slot.
174 1.2.4.2 skrll
175 1.2.4.2 skrll 12) DM_TABLE_DEPS
176 1.2.4.2 skrll
177 1.2.4.2 skrll in: dm-ioctl(name/uuid)
178 1.2.4.2 skrll
179 1.2.4.2 skrll out: list of dependiences devices
180 1.2.4.2 skrll
181 1.2.4.2 skrll Function:
182 1.2.4.2 skrll Return set of device dependiences e.g. mirror device for mirror target etc..
183 1.2.4.2 skrll
184 1.2.4.2 skrll 13) DM_TABLE_STATUS
185 1.2.4.2 skrll
186 1.2.4.2 skrll in: dm-ioctl(name/uuid)
187 1.2.4.2 skrll
188 1.2.4.2 skrll out: list of used tables from selected devices (linux use struct dm_target_spec)
189 1.2.4.2 skrll
190 1.2.4.2 skrll Function:
191 1.2.4.2 skrll List all tables in active slot in device with name name/uuid.
192 1.2.4.2 skrll
193 1.2.4.2 skrll Implementation:
194 1.2.4.2 skrll Kernel driver will find device with name from struct dm_ioctl-name/uuid.
195 1.2.4.2 skrll DM driver will copyout dm_target_spec structures behidn struct dm_ioctl.
196 1.2.4.2 skrll
197 1.2.4.2 skrll 14) DM_LIST_VERSIONS
198 1.2.4.2 skrll
199 1.2.4.2 skrll in: none
200 1.2.4.2 skrll
201 1.2.4.2 skrll out: list of all targets in device-mapper driver (linux use struct dm_target_versions)
202 1.2.4.2 skrll
203 1.2.4.2 skrll Function:
204 1.2.4.2 skrll List all available targets to libdevmapper.
205 1.2.4.2 skrll
206 1.2.4.2 skrll Implementation:
207 1.2.4.2 skrll Kernel driver will copy out known target versions.
208 1.2.4.2 skrll
209 1.2.4.2 skrll 15) DM_TARGET_MSG
210 1.2.4.2 skrll
211 1.2.4.2 skrll in: message to driver (linux use struct dm_target_msg)
212 1.2.4.2 skrll
213 1.2.4.2 skrll out: none
214 1.2.4.2 skrll
215 1.2.4.2 skrll Function:
216 1.2.4.2 skrll Send message to kernel driver target.
217 1.2.4.2 skrll
218 1.2.4.2 skrll
219 1.2.4.2 skrll 16) DM_DEV_SET_GEOMETRY
220 1.2.4.2 skrll
221 1.2.4.2 skrll Function:
222 1.2.4.2 skrll Set geometry of device-mapper driver.
223 1.2.4.2 skrll
224 1.2.4.2 skrll
225 1.2.4.2 skrll NetBSD device-mapper driver implementation
226 1.2.4.2 skrll
227 1.2.4.2 skrll device-mapper devices -> devs dm_dev.c
228 1.2.4.2 skrll
229 1.2.4.2 skrll This entity is created with DM_DEV_CREATE ioctl, and stores info
230 1.2.4.2 skrll about every device in device mapper driver. It has two slots for
231 1.2.4.2 skrll active and inactive table, list of active physical devices added
232 1.2.4.2 skrll to this device and list of upcalled devices (for targets which use
233 1.2.4.2 skrll more than one physical device e.g. mirror, snapshot etc..).
234 1.2.4.2 skrll
235 1.2.4.2 skrll device-mapper physical devices -> pdevs dm_pdev.c
236 1.2.4.2 skrll
237 1.2.4.2 skrll This structure contains opened device VNODES. Because I physical
238 1.2.4.2 skrll device can be found in more than one table loaded to different
239 1.2.4.2 skrll dm devices. When device is destroyed I decrement all reference
240 1.2.4.2 skrll counters for all added pdevs (I remove pdevs with ref_cnt == 0).
241 1.2.4.2 skrll
242 1.2.4.2 skrll device-mapper tables -> table dm_table.c, dm_ioctl.c
243 1.2.4.2 skrll
244 1.2.4.2 skrll Table describe how is dm device made. What blocks are mapped with
245 1.2.4.2 skrll what target. In our implementation every table contains pointer to
246 1.2.4.2 skrll target specific config data. These config_data are allocated in
247 1.2.4.2 skrll DM_TABLE_LOAD function with target_init routine. Every table
248 1.2.4.2 skrll contains pointer to used target.
249 1.2.4.2 skrll
250 1.2.4.2 skrll device-mapper targets -> target dm_target.c
251 1.2.4.2 skrll
252 1.2.4.2 skrll Target describes mapping of logical blocks to physical. It has
253 1.2.4.2 skrll function pointers to function which does init, strategy, destroy,
254 1.2.4.2 skrll upcall functions.
255 1.2.4.2 skrll
256 1.2.4.2 skrll P.S I want to thank reinod@ for great help and guidance :).
257 1.2.4.2 skrll
258 1.2.4.2 skrll
259 1.2.4.2 skrll
260 1.2.4.2 skrll Desing of new device-mapper ioctl interface
261 1.2.4.2 skrll
262 1.2.4.2 skrll Basic architecture of device-mapper -> libdevmapper ioctl interface is this.
263 1.2.4.2 skrll Libdevmapper allocate buffer with size of data_size. At the start of this buffer
264 1.2.4.2 skrll dm-ioctl structure is placed. any aditional information from/to kernel are placed
265 1.2.4.2 skrll behind end (start of data part is pointed with data_start var.) of dm-ioctl struct.
266 1.2.4.2 skrll
267 1.2.4.2 skrll Kernel driver then after ioctl call have to copyin data from userspace to kernel.
268 1.2.4.2 skrll When kernel driver want to send data back to user space library it must copyout
269 1.2.4.2 skrll data from kernel.
270 1.2.4.2 skrll
271 1.2.4.2 skrll 1) In Linux device-mapper ioctl interface implementation there are these ioctls.
272 1.2.4.2 skrll
273 1.2.4.2 skrll DM_VERSION *
274 1.2.4.2 skrll DM_REMOVE_ALL
275 1.2.4.2 skrll DM_LIST_DEVICES *
276 1.2.4.2 skrll DM_DEV_CREATE *
277 1.2.4.2 skrll DM_DEV_REMOVE *
278 1.2.4.2 skrll DM_DEV_RENAME *
279 1.2.4.2 skrll DM_DEV_SUSPEND
280 1.2.4.2 skrll DM_DEV_STATUS *
281 1.2.4.2 skrll DM_DEV_WAIT
282 1.2.4.2 skrll DM_TABLE_LOAD *
283 1.2.4.2 skrll DM_TABLE_CLEAR *
284 1.2.4.2 skrll DM_TABLE_DEPS
285 1.2.4.2 skrll DM_TABLE_STATUS *
286 1.2.4.2 skrll DM_LIST_VERSIONS *
287 1.2.4.2 skrll DM_TARGET_MSG
288 1.2.4.2 skrll DM_DEV_SET_GEOMETRY
289 1.2.4.2 skrll
290 1.2.4.2 skrll * means implemented in current version of NetBSD device-mapper.
291 1.2.4.2 skrll
292 1.2.4.2 skrll 1a) struct dm_ioctl based ioctl calls
293 1.2.4.2 skrll These ioctl calls communicate only with basic dm_ioctl structure.
294 1.2.4.2 skrll
295 1.2.4.2 skrll DM_VERSION
296 1.2.4.2 skrll DM_DEV_STATUS
297 1.2.4.2 skrll DM_DEV_CREATE
298 1.2.4.2 skrll
299 1.2.4.2 skrll Protocol structure:
300 1.2.4.2 skrll
301 1.2.4.2 skrll struct dm_ioctl {
302 1.2.4.2 skrll uint32_t version[3]; /* device-mapper kernel/userspace version */
303 1.2.4.2 skrll uint32_t data_size; /* total size of data passed in
304 1.2.4.2 skrll * including this struct */
305 1.2.4.2 skrll
306 1.2.4.2 skrll uint32_t data_start; /* offset to start of data
307 1.2.4.2 skrll * relative to start of this struct */
308 1.2.4.2 skrll
309 1.2.4.2 skrll uint32_t target_count; /* in/out */ /* This should be set when DM_TABLE_STATUS is called */
310 1.2.4.2 skrll int32_t open_count; /* device open count */
311 1.2.4.2 skrll uint32_t flags; /* information flags */
312 1.2.4.2 skrll uint32_t event_nr; /* event counters not implemented */
313 1.2.4.2 skrll uint32_t padding;
314 1.2.4.2 skrll
315 1.2.4.2 skrll uint64_t dev; /* dev_t */
316 1.2.4.2 skrll
317 1.2.4.2 skrll char name[DM_NAME_LEN]; /* device name */
318 1.2.4.2 skrll char uuid[DM_UUID_LEN]; /* unique identifier for
319 1.2.4.2 skrll * the block device */
320 1.2.4.2 skrll
321 1.2.4.2 skrll void *user_space_addr; /*this is needed for netbsd
322 1.2.4.2 skrll because they differently
323 1.2.4.2 skrll implement ioctl syscall*/
324 1.2.4.2 skrll };
325 1.2.4.2 skrll
326 1.2.4.2 skrll As SOC task I want to replace this structure with proplib dict. Proplib dict
327 1.2.4.2 skrll basic structure should be:
328 1.2.4.2 skrll
329 1.2.4.2 skrll Note: I don't need data_star, data_size and use_space_addr. They are needed
330 1.2.4.2 skrll for current implementation.
331 1.2.4.2 skrll
332 1.2.4.2 skrll <dict>
333 1.2.4.2 skrll <key>version</key>
334 1.2.4.2 skrll <string>...</string>
335 1.2.4.2 skrll
336 1.2.4.2 skrll <key>target_count</key>
337 1.2.4.2 skrll <integer></integer>
338 1.2.4.2 skrll
339 1.2.4.2 skrll <key>open_count</key>
340 1.2.4.2 skrll <integer></integer>
341 1.2.4.2 skrll
342 1.2.4.2 skrll <key>flags</key>
343 1.2.4.2 skrll <integer></integer>
344 1.2.4.2 skrll
345 1.2.4.2 skrll <key>event_nr</key>
346 1.2.4.2 skrll <integer></integer>
347 1.2.4.2 skrll
348 1.2.4.2 skrll <key>dev</key>
349 1.2.4.2 skrll <integer></integer>
350 1.2.4.2 skrll
351 1.2.4.2 skrll <key>name</key>
352 1.2.4.2 skrll <string>...</string>
353 1.2.4.2 skrll
354 1.2.4.2 skrll <key>uuid</key>
355 1.2.4.2 skrll <string>...</string>
356 1.2.4.2 skrll
357 1.2.4.2 skrll
358 1.2.4.2 skrll <dict>
359 1.2.4.2 skrll <!-- ioctl specific data -->
360 1.2.4.2 skrll </dict>
361 1.2.4.2 skrll </dict>
362 1.2.4.2 skrll
363 1.2.4.2 skrll 1b) DM_LIST_VERSIONS ioctl
364 1.2.4.2 skrll
365 1.2.4.2 skrll This ioctl is used to get list of supported targets from kernel. Target
366 1.2.4.2 skrll define mapping of Logical blocks to physical blocks on real device.
367 1.2.4.2 skrll There are linear, zero, error, mirror, snapshot, multipath etc... targets.
368 1.2.4.2 skrll
369 1.2.4.2 skrll For every target kernel driver should copyout this structure to userspace.
370 1.2.4.2 skrll
371 1.2.4.2 skrll Protocol structure:
372 1.2.4.2 skrll
373 1.2.4.2 skrll struct dm_target_versions {
374 1.2.4.2 skrll uint32_t next;
375 1.2.4.2 skrll uint32_t version[3];
376 1.2.4.2 skrll
377 1.2.4.2 skrll char name[0];
378 1.2.4.2 skrll };
379 1.2.4.2 skrll
380 1.2.4.2 skrll Because I need more then on dm_target_version I will need one major proplib
381 1.2.4.2 skrll dictionary to store children dictionaries with target data.
382 1.2.4.2 skrll
383 1.2.4.2 skrll <dict>
384 1.2.4.2 skrll <dict ID="id">
385 1.2.4.2 skrll <key>version</key>
386 1.2.4.2 skrll <string>...</string>
387 1.2.4.2 skrll
388 1.2.4.2 skrll <key>name</key>
389 1.2.4.2 skrll <string>...</string>
390 1.2.4.2 skrll </dict>
391 1.2.4.2 skrll </dict>
392 1.2.4.2 skrll
393 1.2.4.2 skrll 2a) DM_LIST_DEVICES
394 1.2.4.2 skrll
395 1.2.4.2 skrll This ioctl is used to list all devices defined in kernel driver.
396 1.2.4.2 skrll
397 1.2.4.2 skrll Protocol structure:
398 1.2.4.2 skrll
399 1.2.4.2 skrll struct dm_name_list {
400 1.2.4.2 skrll uint64_t dev;
401 1.2.4.2 skrll uint32_t next; /* offset to the next record from
402 1.2.4.2 skrll the _start_ of this */
403 1.2.4.2 skrll char name[0];
404 1.2.4.2 skrll };
405 1.2.4.2 skrll
406 1.2.4.2 skrll Again because I can have more than one device in kernel driver I need one parent
407 1.2.4.2 skrll dictionary and more children dictionaries.
408 1.2.4.2 skrll
409 1.2.4.2 skrll <dict>
410 1.2.4.2 skrll <dict ID="id">
411 1.2.4.2 skrll <key>dev</key>
412 1.2.4.2 skrll <integer>...</integer>
413 1.2.4.2 skrll
414 1.2.4.2 skrll <key>name</key>
415 1.2.4.2 skrll <string>...</string>
416 1.2.4.2 skrll </dict>
417 1.2.4.2 skrll </dict>
418 1.2.4.2 skrll
419 1.2.4.2 skrll 2b) DM_DEV_RENAME
420 1.2.4.2 skrll This ioctl is called when libdevmapper want to rename device-mapper device.
421 1.2.4.2 skrll Libdevmapper library appends null terminated string to dm_ioctl struct in
422 1.2.4.2 skrll userspace..
423 1.2.4.2 skrll
424 1.2.4.2 skrll <dict>
425 1.2.4.2 skrll <key>name</key>
426 1.2.4.2 skrll <string>...</string>
427 1.2.4.2 skrll </dict>
428 1.2.4.2 skrll
429 1.2.4.2 skrll 2c) DM_DEV_CREATE, DM_DEV_REMOVE, DM_DEV_STATUS
430 1.2.4.2 skrll Modify only dm_ioctl structure so I don't need to specify new structures.
431 1.2.4.2 skrll
432 1.2.4.2 skrll
433 1.2.4.2 skrll 3a) DM_TABLE_LOAD, DM_TABLE_STATUS
434 1.2.4.2 skrll DM_TABLE_LOAD ioctl loads table to device. DM_TABLE_STATUS send info about
435 1.2.4.2 skrll every table for selected device to userspace. Table is different for every
436 1.2.4.2 skrll target basic table structure is this
437 1.2.4.2 skrll
438 1.2.4.2 skrll {start} {length} {target} {additional information}
439 1.2.4.2 skrll
440 1.2.4.2 skrll e.g.
441 1.2.4.2 skrll 0 100 zero
442 1.2.4.2 skrll
443 1.2.4.2 skrll 0 100 linear /dev/wdba 384
444 1.2.4.2 skrll
445 1.2.4.2 skrll Protocol structure:
446 1.2.4.2 skrll
447 1.2.4.2 skrll struct dm_target_spec {
448 1.2.4.2 skrll uint64_t sector_start;
449 1.2.4.2 skrll uint64_t length;
450 1.2.4.2 skrll int32_t status; /* used when reading from kernel only */
451 1.2.4.2 skrll
452 1.2.4.2 skrll uint32_t next;
453 1.2.4.2 skrll
454 1.2.4.2 skrll char target_type[DM_MAX_TYPE_NAME];
455 1.2.4.2 skrll
456 1.2.4.2 skrll /*
457 1.2.4.2 skrll * Parameter string starts immediately after this object.
458 1.2.4.2 skrll * Be careful to add padding after string to ensure correct
459 1.2.4.2 skrll * alignment of subsequent dm_target_spec.
460 1.2.4.2 skrll */
461 1.2.4.2 skrll };
462 1.2.4.2 skrll
463 1.2.4.2 skrll <dict>
464 1.2.4.2 skrll <key>sector_start</key>
465 1.2.4.2 skrll <integer>...</integer>
466 1.2.4.2 skrll
467 1.2.4.2 skrll <key>length</key>
468 1.2.4.2 skrll <integer>...</integer>
469 1.2.4.2 skrll
470 1.2.4.2 skrll <key>target_type</key>
471 1.2.4.2 skrll <string>...</string>
472 1.2.4.2 skrll
473 1.2.4.2 skrll <key>aditional info</key>
474 1.2.4.2 skrll <string>...</string>
475 1.2.4.2 skrll </dict>
476