5 Lustre operations are denoted by the 'pb_opc' op-code field of the
6 message preamble. Each operation is implemented as a pair of messages,
7 with the 'pb_type' field set to PTLRPC_MSG_REQUEST for requests
8 initiating the operation, and PTLRPC_MSG_REPLY for replies. Note that
9 as a general matter, the receipt by a client of the rply message only
10 assures the client hat the server has initiated the action, if
11 any. See the discussion on <<transno,transaction numbers>>
12 and <<recovery>> for how the client is given confirmation that a
13 request has been completed.
15 include::ost_setattr.txt[]
17 Command 8: OST CONNECT - Client connection to an OST
18 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 | obd_connect_client | obd_connect_server
27 When a client initiates a connection to a specific target on an OSS,
28 it does so by sending an 'obd_connect_client' message and awaiting the
29 reply from the OSS of an 'obd_connect_server' message. From a previous
30 interaction with the MGS the client knows the UUID of the target OST,
31 and can fill that value into the 'obd_connect_client' message.
33 The 'ocd_connect_flags' field is set to (fixme: what?) reflecting the
34 capabilities appropriate to the client. The 'ocd_brw_size' is set to the
35 largest value for the size of an RPC that the client can handle. The
36 'ocd_ibits_known' and 'ocd_checksum_types' values are set to what the client
37 considers appropriate. Other fields in the preamble and
38 'obd_connect_data' structures are zero, as is the 'lustre_handle'
41 Once the server receives the 'obd_connect_client' message on behalf of
42 the given target it replies with an 'obd_connect_server' message. In
43 that message the server sends the 'pb__handle' to uniquely
44 identify the connection for subsequent communication. The client notes
45 that handle in its import for the given target.
47 fixme: Are there circumstances that could lead to the 'status'
48 value in the reply being non-zero? What would lead to that and what
49 error values would result?
51 The target maintains the last committed transaction for a client in
52 its export for that client. If this is the first connection, then that
53 last transactiion value would just be zero. If there were previous
54 transactions for the client, then the transaction number for the last
55 such committed transaction is put in the 'pb_last_committed' field.
57 In a connection request the operation is not file system modifying, so
58 the 'pb_transno' value will be zero in the reply as well.
60 fixme: there is still some work to be done about how the fields are
63 Command 9: OST DISCONNECT - Disconnect client from an OST
64 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 The information exchanged in a DISCONNECT message is that normally
74 conveyed in the mesage preamble.
76 include::ost_punch.txt[]
78 Command 33: MDS GETATTR - Get MDS Attributes
79 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85 | mdt_body_capa | mds_getattr_server
89 include::mds_reint.txt[]
91 Command 38: MDS CONNECT - Client connection to an MDS
92 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98 | obd_connect_client | obd_connect_server
101 N.B. This is nearly identical to the explanation for OST_CONNECT and
102 for MGS_CONNECT. We may want to simplify and/or unify the discussion
103 and only call out how this one differees from a generic CONNECT
106 When a client initiates a connection to a specific target on an MDS,
107 it does so by sending an 'obd_connect_client' message and awaiting the
108 reply from the MDS of an 'obd_connect_server' message. From a previous
109 interaction with the MGS the client knows the UUID of the target MDT,
110 and can fill that value into the 'obd_connect_client' message.
112 The 'ocd_connect_flags' field is set to (fixme: what?) reflecting the
113 capabilities appropriate to the client. The 'ocd_brw_size' is set to the
114 largest value for the size of an RPC that the client can handle. The
115 'ocd_ibits_known' and 'ocd_checksum_types' values are set to what the client
116 considers appropriate. Other fields in the preamble and
117 'obd_connect_data' structures are zero, as is the 'lustre_handle'
120 Once the server receives the 'obd_connect_client' message on behalf of
121 the given target it replies with an 'obd_connect_server' message. In
122 that message the server sends the 'pb__handle' to uniquely
123 identify the connection for subsequent communication. The client notes
124 that handle in its import for the given target.
126 fixme: Are there circumstances that could lead to the 'status'
127 value in the reply being non-zero? What would lead to that and what
128 error values would result?
130 The target maintains the last committed transaction for a client in
131 its export for that client. If this is the first connection, then that
132 last transactiion value would just be zero. If there were previous
133 transactions for the client, then the transaction number for the last
134 such committed transaction is put in the 'pb_last_committed' field.
136 In a connection request the operation is not file system modifying, so
137 the 'pb_transno' value will be zero in the reply as well.
139 fixme: there is still some work to be done about how the fields are
142 Command 39: MDS DISCONNECT - Disconnect client from an MDS
143 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152 The information exchanged in a DISCONNECT message is that normally
153 conveyed in the mesage preamble.
155 Command 40: MDS GETSTATUS - get the status from a target
156 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158 The MDS_GETSTATUS command targets a specific MDT. If there are several,
159 the client will need to send a separate message for each.
165 | mdt_body_only | mdt_body_capa
168 The 'mdt_body_only' request message is one that provides information
169 about a specific MDT, identifying which (among several possible)
170 target is being asked about.
172 In the reply there is additional information about the MDT's
175 Command 41: MDS STATFS - get statfs data from the server
176 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182 | empty | obd_statfs_server
185 The 'empty' request message is one that only has the 'ptlrpc_body'
186 data encoded. The fields have thier generic values for a request from
187 this client, with 'pb_opc' being set to MDS_STATFS (41).
189 In the reply there is, in addition to the 'ptlrpc_body', data relevant
190 to a 'statfs' system call.
192 include::mds_getxattr.txt[]
194 include::ldlm_enqueue.txt[]
196 include::ldlm_cancel.txt[]
198 include::ldlm_bl_callback.txt[]
200 include::ldlm_cp_callback.txt[]
202 Command 250: MGS CONNECT - Client connection to an MGS
203 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
209 | obd_connect_client | obd_connect_server
212 When a client initiates a connection to the MGS,
213 it does so by sending an 'obd_connect_client' message and awaiting the
214 reply from the MGS of an 'obd_connect_server' message. This is the
215 first operation carried out by a client upon the issue of a 'mount'
216 command, and the target UUID is provided on the command line.
218 The target UUID is just "MGS", and the client UUID is set to the
219 32byte string it gets from ... where?
221 The 'struct lustre_handle' (the fourth buffer in the message) has its
222 cookie set to .. what? It is set, but where does it come from?
224 The 'ocd_connect_flags' field is set to (fixme: what?) reflecting the
225 capabilities appropriate to the client. The 'ocd_brw_size' is set to the
226 largest value for the size of an RPC that the client can handle. The
227 'ocd_ibits_known' and 'ocd_checksum_types' values are set to what the client
228 considers appropriate. Other fields in the preamble and
229 'obd_connect_data' structures are zero.
231 Once the server receives the 'obd_connect_client' message on behalf of
232 the given target it replies with an 'obd_connect_server' message. In
233 that message the server sends the 'pb__handle' to uniquely
234 identify the connection for subsequent communication. The client notes
235 that handle in its import for the given target.
237 fixme: Are there circumstances that could lead to the 'status'
238 value in the reply being non-zero? What would lead to that and what
239 error values would result?
241 The target maintains the last committed transaction for a client in
242 its export for that client. If this is the first connection, then that
243 last transactiion value would just be zero. If there were previous
244 transactions for the client, then the transaction number for the last
245 such committed transaction is put in the 'pb_last_committed' field.
247 In a connection request the operation is not file system modifying, so
248 the 'pb_transno' value will be zero in the reply as well.
250 Command 251: MGS DISCONNECT - Disconnect client from an MGS
251 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
253 .MGS_DISCONNECT (251)
260 N.B. The usual 'struct req_format' definition does not exist for
261 MGS_DISCONNECT. It will take a more careful code review to verify that
262 it also has 'empty' messages gong back and forth.
264 The information exchanged in a DISCONNECT message is that normally
265 conveyed in the mesage preamble.
267 Command 256: MGS CONFIG READ - Read MGS configuration info
268 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
270 .MGS_CONFIG_READ (256)
274 | mgs_config_read_client | mgs_config_read_server
277 Command 501: LLOG ORIGIN HANDLE CREATE - Create llog handle
278 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280 .LLOG_ORIGIN_HANDLE_CREATE (510)
284 | llog_origin_handle_create_client | llogd_body_only
287 Command 502: LLOG ORIGIN HANDLE NEXT BLOCK - Read the next block
288 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
290 .LLOG_ORIGIN_HANDLE_NEXT_BLOCK (502)
294 | llogd_body_only | llog_origin_handle_next_block_server
297 Command 503: LLOG ORIGIN HANDLE READ HEADER - Read handle header
298 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300 .LLOG_ORIGIN_HANDLE_READ_HEADER (503)
304 | llogd_body_only | llog_log_hdr_only
307 LLOG_ORIGIN_HANDLE_NEXT_BLOCK