Whamcloud - gitweb
89188f65ed612a1bdc0f1bbee5b7a58859673d75
[doc/protocol.git] / lustre_messages.txt
1 Lustre Messages
2 ---------------
3 [[lustre-messages]]
4
5 A Lustre message is a sequence of bytes. The message begins with a
6 <<lustre-message-header,Lustre Message Header>> and has between one
7 and nine sub-sequences called "buffers". Each buffer has a structure
8 (the size and meaning of the bytes) that corresponds to the 'struct'
9 entities in the <<data-structs,Data Structures and Defines Section>>
10 Section. The header gives the number of buffers in its 'lm_buffcount'
11 field. The first buffer in any message is always the
12 <<struct-ptlrpc-body,Lustre RPC Descriptor>>. The operation
13 code ('pb_opc' field) and the message type ('pb_type' field: request
14 or reply?) in the descriptor together specify the "format" of the
15 message, where the format is the number and content of the remaining
16 buffers. As a shorthand, it is useful to name each of these formats,
17 and the following list gives all of the formats along with the number
18 and content of the buffers for messages in that format. Note that
19 while the combination of 'pb_opc' and 'pb_type' uniquely determines a
20 message's format, the reverse is not true. A given format may be used
21 in many different messages.
22
23 N.B. As each of the following "message formats" is introduced in the
24 context of describing "Lustre commands", the corresponding section
25 here will be deleted. These brief entries just state the name of the
26 format and its structures. That information is better included in the
27 section on the command itself. -ACU
28
29 The LLog Origin Handle Create Client
30 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
32 'llog_origin_handle_create_client'
33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34
35 .example
36 [options="header"]
37 |====
38 | pb_opc                    | pb_type
39 | LLOG_ORIGIN_HANDLE_CREATE | PTL_RPC_MSG_REQUEST
40 |====
41
42
43 An 'llog_origin_handle_create_client' message format is used to
44 ask for the creation of a log entry object.
45
46 .format
47 [options="header"]
48 |====
49 | structure    | meaning
50 | ptlrpc_body  | RPC descriptor
51 | llogd_body   | LLog description
52 | string       | The name of the desired log
53 |====
54
55 Fixme: I don't actually see where the string gets set.
56
57 The LLog Service (body-only) Message
58 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59
60 'llogd_body_only'
61 ^^^^^^^^^^^^^^^^^
62
63 .example
64 [options="header"]
65 |====
66 | pb_opc                    | pb_type
67 | LLOG_ORIGIN_HANDLE_CREATE | PTL_RPC_MSG_REPLY
68 |====
69
70
71 An 'llogd_body_only' message replies with information about the log.
72
73 .format
74 [options="header"]
75 |====
76 | structure    | meaning
77 | ptlrpc_body  | RPC descriptor
78 | llogd_body   | LLog description
79 |====
80
81
82 The LLog Log (header-only) Message
83 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84
85 'llog_log_hdr_only'
86 ^^^^^^^^^^^^^^^^^^^
87
88 .example
89 [options="header"]
90 |====
91 | pb_opc                         | pb_type
92 | LLOG_ORIGIN_HANDLE_READ_HEADER | PTL_RPC_MSG_REPLY
93 |====
94
95
96 An 'llog_log_hdr_only' message replies with header information from
97 the log.
98
99 .format
100 [options="header"]
101 |====
102 | structure     | meaning
103 | ptlrpc_body   | RPC descriptor
104 | llog_log_hdr  | LLog log header info
105 |====
106
107
108 The LLog Return Next Block from Server
109 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
110
111 'llog_origin_handle_next_block_server'
112 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
114 .example
115 [options="header"]
116 |====
117 | pb_opc                        | pb_type
118 | LLOG_ORIGIN_HANDLE_NEXT_BLOCK | PTL_RPC_MSG_REPLY
119 |====
120
121
122 An 'llog_origin_handle_next_block_server' message replies with the
123 next block of data from the log.
124
125 .format
126 [options="header"]
127 |====
128 | structure     | meaning
129 | ptlrpc_body   | RPC descriptor
130 | llogd_body    | LLog description
131 | eadata        | variable length field for extended attributes
132 |====
133
134
135 The MDS Getattr Server Message
136 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
138 'mds_getattr_server'
139 ^^^^^^^^^^^^^^^^^^^^
140
141 .example
142 [options="header"]
143 |====
144 | pb_opc      | pb_type
145 | MDS_GETATTR | PTL_RPC_MSG_REPLY
146 |====
147
148 An 'mds_getattr_server' message format is used to convey MDT data along
149 with information about the Lustre capabilities of that MDT.
150
151 .format
152 [options="header"]
153 |====
154 | structure        | meaning
155 | ptlrpc_body      | RPC descriptor
156 | mdt_body         | Information about the MDT
157 | MDT_MD           | OST stripe and index info
158 | ACL              | ACLs for the fid
159 | lustre_capa      | Security capa info for fid1
160 | lustre_capa      | Security capa info for fid2
161 |====
162
163 An 'mdt_getattr_server' message concatenates three data elements into
164 a single byte-stream. The three elements correspond to structures
165 detailed in the <<data-structs,Data Structures and Defines Section>>.
166
167 The MDT Capability Message
168 ~~~~~~~~~~~~~~~~~~~~~~~~~~
169
170 'mdt_body_capa'
171 ^^^^^^^^^^^^^^^
172
173 .example
174 [options="header"]
175 |====
176 | pb_opc        | pb_type
177 | MDS_GETSTATUS | PTL_RPC_MSG_REPLY
178 | MDS_GETATTR   | PTL_RPC_MSG_REQUEST
179 |====
180
181 An 'mdt_body_capa' message format is used to convey MDT data along
182 with information about the Lustre capabilities of that MDT.
183
184 .format
185 [options="header"]
186 |====
187 | structure        | meaning
188 | ptlrpc_body      | RPC descriptor
189 | mdt_body         | Information about the MDT
190 | lustre_capa      | security capa info
191 |====
192
193 An 'mdt_body_capa' message concatenates three data elements into
194 a single byte-stream. The three elements correspond to structures
195 detailed in the <<data-structs,Data Structures and Defines Section>>.
196
197 The MDT "Body Only" Message
198 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
199
200 'mdt_body_only'
201 ^^^^^^^^^^^^^^^
202
203 .example
204 [options="header"]
205 |====
206 | pb_opc        | pb_type
207 | MDS_GETSTATUS | PTL_RPC_MSG_REQUEST
208 |====
209
210
211 An 'mdt_body_only' message format is used to convey MDT data.
212
213 .format
214 [options="header"]
215 |====
216 | structure        | meaning
217 | ptlrpc_body      | RPC descriptor
218 | mdt_body         | Information about the MDT
219 |====
220
221 An 'mdt_body_only' message concatenates two data elements into
222 a single byte-stream. The two elements correspond to structures
223 detailed in the <<data-structs,Data Structures and Defines Section>>.
224
225 The MGS Config Read Client Message
226 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227
228 'mgs_config_read_client'
229 ^^^^^^^^^^^^^^^^^^^^^^^^
230
231 .example
232 [options="header"]
233 |====
234 | pb_opc          | pb_type
235 | MGS_CONFIG_READ | PTL_RPC_MSG_REQUEST
236 |====
237
238 An 'mgs_config_read_client' message requests configuration data from
239 the MGS.
240
241 .format
242 [options="header"]
243 |====
244 | structure        | meaning
245 | ptlrpc_body      | RPC descriptor
246 | mgs_config_body  | Information about the MGS supporting the request
247 |====
248
249
250 The MGS Config Read Server Message
251 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
252
253 'mgs_config_read_server'
254 ^^^^^^^^^^^^^^^^^^^^^^^^
255
256 .example
257 [options="header"]
258 |====
259 | pb_opc          | pb_type
260 | MGS_CONFIG_READ | PTL_RPC_MSG_REPLY
261 |====
262
263 An 'mgs_config_read_server' message returns configuration data from
264 the MGS.
265
266 .format
267 [options="header"]
268 |====
269 | structure        | meaning
270 | ptlrpc_body      | RPC descriptor
271 | mgs_config_body  | Information about the MGS supporting the request
272 |====
273
274
275 The OBD Connect Client Message
276 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277
278 'obd_connect_client'
279 ^^^^^^^^^^^^^^^^^^^^
280
281 .example
282 [options="header"]
283 |====
284 | pb_opc      | pb_type
285 | MDS_CONNECT | PTL_RPC_MSG_REQUEST
286 |====
287
288
289 An 'obd_connect_client' message format is used to initiate the
290 connection from one host to a target on another host. Clients will
291 connect to the MGS, to MDTS on MDSs, and to OSTs on OSSs. Furthermore,
292 MDSs and OSSs will connect to the MGS, and MDSs will connect to OSTs
293 on OSSs. In each case the host initiating the the connection request
294 sends an 'obd_connect_client' message. The reply to this message is
295 the obd_connect_server message.
296
297 .format
298 [options="header"]
299 |====
300 | structure        | meaning
301 | ptlrpc_body      | RPC descriptor
302 | obd_uuid         | UUID of the target
303 | obd_uuid         | UUID of the client
304 | lustre_handle    | connection handle
305 | obd_connect_data | connection data
306 |====
307
308 An 'obd_connect_client' message concatenates five data elements into
309 a single byte-stream. The five elements correspond to structures
310 detailed in the <<data-structs,Data Structures and Defines Section>>.
311
312 The connection handle sent in a client connection request message is
313 unique to that connection. The server notes it and a connection
314 request with a new or different handle indicates that the client is
315 attempting to make a new connection (or a delayed message about an
316 old one?).
317
318 The OBD Connect Server Message
319 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
320
321 ' obd_connect_server'
322 ^^^^^^^^^^^^^^^^^^^^^
323
324 .example
325 [options="header"]
326 |====
327 | pb_opc      | pb_type
328 | MDS_CONNECT | PTL_RPC_MSG_REPLY
329 |====
330
331 The 'obd_connect_server' mess-sage format is sent by a server in reply
332 to an 'obd_connect_client' connection request message. to a target on
333 that server. MGSs, MDSs, and OSSs send these replies.
334
335 .format
336 [options="header"]
337 |====
338 | structure        | meaning
339 | ptlrpc_body      | RPC descriptor
340 | obd_connect_data | connection data
341 |====
342
343 An 'obd_connect_server' message concatenates two data elements into a
344 single byte-stream.
345
346 The OBD Statfs Server Message
347 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
348
349 'obd_statfs_server'
350 ^^^^^^^^^^^^^^^^^^^
351
352 .example
353 [options="header"]
354 |====
355 | pb_opc     | pb_type
356 | MDS_STATFS | PTL_RPC_MSG_REPLY
357 |====
358
359 The 'obd_statfs_server' message returns 'statfs' system call
360 information to the client.
361
362 .format
363 [options="header"]
364 |====
365 | structure        | meaning
366 | ptlrpc_body      | RPC descriptor
367 | obd_statfs       | statfs system call info
368 |====
369