1 Named Request Message Pairs
2 ===========================
4 Each request message pair is identified in the source code by a symbol
5 that starts iwth "RQF_". Each has a name and two message formats. The
6 request message pair's name is a string. The two message formats in a
7 message pair are the symbols given for a request message, on the one
8 hand, and a reply message, on the other.
13 The name appears as a string in the first position (argument) of a
14 "struct req_format" declaration. The symbol for the message pair is
15 usually the same as the name string but with "RQF_" in front of
16 it. Thus the message pair named "MDS_CONNECT" appears in the code as
17 the symbol "RQF_MDS_CONNECT". The name itself is only used for
18 reporting purposes, for example in the traces decoded and reported
19 through the Lustre wireshark extension. There are a few occasions
20 (likely bugs) where the name and the symbol do not actually match in
21 the way described above. Those instances are:
23 - Both RQF_LDLM_GL_DESC_CALLBACK and RQF_LDLM_GL_CALLBACK use the name
25 - RQF_LOG_CANCEL is named OBD_LOG_CANCEL
26 - RQF_MDS_REINT_CREATE_SLAVE is named MDS_REINT_CREATE_EA
27 - Both RQF_MDS_CLOSE and RQF_MDS_RELEASE_CLOSE are named MDS_CLOSE
28 - Both RQF_OUT_UPDATE and RQF_OUT_UPDATE_OBJ are named OUT_UPDATE
30 The RQF_* symbols are gathered in the:
32 static struct req_format *req_formats[] =
34 array in layout.c. Their declarations, with the pair's name and the
35 names of the two actual message formats, follow soon after in the same
41 The pair of symbols in a request message pair identify the format for
42 each corresponding PtlRPC message, with the first of the pair being a
43 request for action of some sort and the second being the reply
44 appropriate to the request. See message_formats.txt for details about
45 the structure of each message format. In many cases the host making
46 the request will be a Lustre client, but that is not universally the
47 case. For example, a lock callback might be initiated by the MDS and
48 the request sent from the MDS to a Lustre client. In other cases the
49 message request is between two Lustre servers. The message pairs
50 always list the (symbol for the) request first and then the
51 reply. Many of those pairs employ the words "client" and "server" in
52 the symbol's name. This is unfortunate. Such "client" messages are not
53 necessarily sent from Lustre clients and such "server" messages are
54 not necessarily replies sent from Lustre servers. A symbol with the
55 word "client" should always be thought of simply as the format of a
56 message initiating a request. Likewise, "server" symbols simply mean
57 the format for a message in reply to a request, whatever the actual
58 host that sends the reply. So the message pair should be understood
59 as a message initiating a request and the message that is anticipated
60 in reply to that request.
65 The name in the RQF_BLA definition will sometimes, but not always,
66 correspond to the source code symbolic representation (in
67 lustre/include/lustre/lustre_idl.h) of an "op code" as encoded in the
68 "__u32 pb_opc" field of the "struct ptlrpc_body_v3". The op code
69 symbols are defined in a collection of *_cmd_t enumerations in
72 Historically, PtlRPC message consturuction was somewhat ad hoc, and
73 carried out at the point where the message was needed. A newer and
74 more systematic construction mechanism resulted in the list of "struct
75 req_format RQF_*" message pair declarations. There are still some 21 or
76 so op codes defined in lustre_idl.h that have no corresponding "struct
77 req_format RQF_BLA" in layouts.c. One example is the "MGS_CONNECT" op
78 code. A code audit will be necessary to see if any of those are
79 obsolete (and/or unused) op codes or if they should be updated to the
80 new form. There are also about 50 "struct req_format RQF_BLA" message
81 pairs defined in layout.c for which there is no corresponding "BLA" op
82 code. A code audit will be needed to determine if any or all of them
83 should be introduced to lustre_idl.h as new op codes or if they (some
84 of them) are obsolete or unused. In some cases (eg. RQF_MDS_REINT_*)
85 one op code (eb. MDS_OPEN) is overloaded for all the message pairs of
88 The following are the 94 named message pairs from layout.c. Each one
89 defines a pair of message formats, which are identified by name. The
90 message formats are reused and there are 95 such message formats for
91 the 94 named message pairs. The message formats themselves are
92 detailed in message_formats.txt. As mentioned above, the first of the
93 pair should be thought of as the actual "request message" being made,
94 and the second of the pair is the "reply message".
96 struct req_format name op code
97 ----------------- ----------------- -----------------
102 RQF_FLD_QUERY FLD_QUERY
106 RQF_FLD_READ FLD_READ
110 RQF_LDLM_BL_CALLBACK LDLM_BL_CALLBACK LDLM_BL_CALLBACK
114 RQF_LDLM_CALLBACK LDLM_CALLBACK
118 RQF_LDLM_CANCEL LDLM_CANCEL LDLM_CANCEL
122 RQF_LDLM_CONVERT LDLM_CONVERT LDLM_CONVERT
126 RQF_LDLM_CP_CALLBACK LDLM_CP_CALLBACK LDLM_CP_CALLBACK
127 ldlm_cp_callback_client
130 RQF_LDLM_ENQUEUE LDLM_ENQUEUE LDLM_ENQUEUE
132 ldlm_enqueue_lvb_server
134 RQF_LDLM_ENQUEUE_LVB LDLM_ENQUEUE_LVB
136 ldlm_enqueue_lvb_server
138 RQF_LDLM_GL_CALLBACK LDLM_GL_CALLBACK LDLM_GL_CALLBACK
140 ldlm_gl_callback_server
142 RQF_LDLM_GL_DESC_CALLBACK LDLM_GL_CALLBACK
143 ldlm_gl_callback_desc_client
144 ldlm_gl_callback_server
146 RQF_LDLM_INTENT LDLM_INTENT
150 RQF_LDLM_INTENT_BASIC LDLM_INTENT_BASIC
151 ldlm_intent_basic_client
152 ldlm_enqueue_lvb_server
154 RQF_LDLM_INTENT_CREATE LDLM_INTENT_CREATE
155 ldlm_intent_create_client
156 ldlm_intent_getattr_server
158 RQF_LDLM_INTENT_GETATTR LDLM_INTENT_GETATTR
159 ldlm_intent_getattr_client
160 ldlm_intent_getattr_server
162 RQF_LDLM_INTENT_GETXATTR LDLM_INTENT_GETXATTR
163 ldlm_intent_getxattr_client
164 ldlm_intent_getxattr_server
166 RQF_LDLM_INTENT_LAYOUT LDLM_INTENT_LAYOUT
167 ldlm_intent_layout_client
168 ldlm_enqueue_lvb_server
170 RQF_LDLM_INTENT_OPEN LDLM_INTENT_OPEN
171 ldlm_intent_open_client
172 ldlm_intent_open_server
174 RQF_LDLM_INTENT_QUOTA LDLM_INTENT_QUOTA
175 ldlm_intent_quota_client
176 ldlm_intent_quota_server
178 RQF_LDLM_INTENT_UNLINK LDLM_INTENT_UNLINK
179 ldlm_intent_unlink_client
182 RQF_LFSCK_NOTIFY LFSCK_NOTIFY LFSCK_NOTIFY
186 RQF_LFSCK_QUERY LFSCK_QUERY LFSCK_QUERY
190 RQF_LLOG_ORIGIN_CONNECT LLOG_ORIGIN_CONNECT
194 RQF_LLOG_ORIGIN_HANDLE_CREATE LLOG_ORIGIN_HANDLE_CREATE
195 llog_origin_handle_create_client
198 RQF_LLOG_ORIGIN_HANDLE_DESTROY LLOG_ORIGIN_HANDLE_DESTROY
202 RQF_LLOG_ORIGIN_HANDLE_NEXT_BLOCK LLOG_ORIGIN_HANDLE_NEXT_BLOCK
204 llog_origin_handle_next_block_server
206 RQF_LLOG_ORIGIN_HANDLE_PREV_BLOCK LLOG_ORIGIN_HANDLE_PREV_BLOCK
208 llog_origin_handle_next_block_server
210 RQF_LLOG_ORIGIN_HANDLE_READ_HEADER LLOG_ORIGIN_HANDLE_READ_HEADER
214 RQF_LOG_CANCEL OBD_LOG_CANCEL OBD_LOG_CANCEL
218 RQF_MDS_CLOSE MDS_CLOSE MDS_CLOSE
220 mds_last_unlink_server
222 RQF_MDS_CONNECT MDS_CONNECT MDS_CONNECT
226 RQF_MDS_DISCONNECT MDS_DISCONNECT MDS_DISCONNECT
230 RQF_MDS_DONE_WRITING MDS_DONE_WRITING MDS_DONE_WRITING
234 RQF_MDS_GETATTR MDS_GETATTR MDS_GETATTR
238 RQF_MDS_GETATTR_NAME MDS_GETATTR_NAME MDS_GETATTR_NAME
239 mds_getattr_name_client
242 RQF_MDS_GETSTATUS MDS_GETSTATUS MDS_GETSTATUS
246 RQF_MDS_GETXATTR MDS_GETXATTR MDS_GETXATTR
250 RQF_MDS_GET_INFO MDS_GET_INFO MDS_GET_INFO
254 RQF_MDS_HSM_ACTION MDS_HSM_ACTION MDS_HSM_ACTION
256 mdt_hsm_action_server
258 RQF_MDS_HSM_CT_REGISTER MDS_HSM_CT_REGISTER MDS_HSM_CT_REGISTER
262 RQF_MDS_HSM_CT_UNREGISTER MDS_HSM_CT_UNREGISTER MDS_HSM_CT_UNREGISTER
263 mdt_hsm_ct_unregister
266 RQF_MDS_HSM_PROGRESS MDS_HSM_PROGRESS MDS_HSM_PROGRESS
270 RQF_MDS_HSM_REQUEST MDS_HSM_REQUEST MDS_HSM_REQUEST
274 RQF_MDS_HSM_STATE_GET MDS_HSM_STATE_GET MDS_HSM_STATE_GET
276 mdt_hsm_state_get_server
278 RQF_MDS_HSM_STATE_SET MDS_HSM_STATE_SET MDS_HSM_STATE_SET
282 RQF_MDS_QUOTACHECK MDS_QUOTACHECK MDS_QUOTACHECK
286 RQF_MDS_QUOTACTL MDS_QUOTACTL MDS_QUOTACTL
290 RQF_MDS_READPAGE MDS_READPAGE MDS_READPAGE
294 RQF_MDS_REINT MDS_REINT MDS_REINT
298 RQF_MDS_REINT_CREATE MDS_REINT_CREATE MDS_OPEN
299 mds_reint_create_client
302 RQF_MDS_REINT_CREATE_RMT_ACL MDS_REINT_CREATE_RMT_ACL MDS_OPEN
303 mds_reint_create_rmt_acl_client
306 RQF_MDS_REINT_CREATE_SLAVE MDS_REINT_CREATE_EA MDS_OPEN
307 mds_reint_create_slave_client
310 RQF_MDS_REINT_CREATE_SYM MDS_REINT_CREATE_SYM MDS_OPEN
311 mds_reint_create_sym_client
314 RQF_MDS_REINT_LINK MDS_REINT_LINK MDS_OPEN
315 mds_reint_link_client
318 RQF_MDS_REINT_OPEN MDS_REINT_OPEN MDS_OPEN
319 mds_reint_open_client
320 mds_reint_open_server
322 RQF_MDS_REINT_RENAME MDS_REINT_RENAME MDS_OPEN
323 mds_reint_rename_client
324 mds_last_unlink_server
326 RQF_MDS_REINT_SETATTR MDS_REINT_SETATTR MDS_OPEN
327 mds_reint_setattr_client
330 RQF_MDS_REINT_SETXATTR MDS_REINT_SETXATTR MDS_OPEN
331 mds_reint_setxattr_client
334 RQF_MDS_REINT_UNLINK MDS_REINT_UNLINK MDS_OPEN
335 mds_reint_unlink_client
336 mds_last_unlink_server
338 RQF_MDS_RELEASE_CLOSE MDS_CLOSE
339 mdt_release_close_client
340 mds_last_unlink_server
342 RQF_MDS_STATFS MDS_STATFS MDS_STATFS
346 RQF_MDS_SWAP_LAYOUTS MDS_SWAP_LAYOUTS MDS_SWAP_LAYOUTS
350 RQF_MDS_SYNC MDS_SYNC MDS_SYNC
354 RQF_MGS_CONFIG_READ MGS_CONFIG_READ MGS_CONFIG_READ
355 mgs_config_read_client
356 mgs_config_read_server
358 RQF_MGS_SET_INFO MGS_SET_INFO MGS_SET_INFO
362 RQF_MGS_TARGET_REG MGS_TARGET_REG MGS_TARGET_REG
366 RQF_OBD_IDX_READ OBD_IDX_READ OBD_IDX_READ
370 RQF_OBD_PING OBD_PING OBD_PING
374 RQF_OBD_SET_INFO OBD_SET_INFO
378 RQF_OST_BRW_READ OST_BRW_READ
382 RQF_OST_BRW_WRITE OST_BRW_WRITE
386 RQF_OST_CONNECT OST_CONNECT OST_CONNECT
390 RQF_OST_CREATE OST_CREATE OST_CREATE
394 RQF_OST_DESTROY OST_DESTROY OST_DESTROY
398 RQF_OST_DISCONNECT OST_DISCONNECT OST_DISCONNECT
402 RQF_OST_GETATTR OST_GETATTR OST_GETATTR
406 RQF_OST_GET_INFO OST_GET_INFO OST_GET_INFO
407 ost_get_info_generic_client
408 ost_get_info_generic_server
410 RQF_OST_GET_INFO_FIEMAP OST_GET_INFO_FIEMAP
411 ost_get_fiemap_client
412 ost_get_fiemap_server
414 RQF_OST_GET_INFO_LAST_FID OST_GET_INFO_LAST_FID
415 ost_get_last_fid_client
416 ost_get_last_fid_server
418 RQF_OST_GET_INFO_LAST_ID OST_GET_INFO_LAST_ID
419 ost_get_info_generic_client
420 ost_get_last_id_server
422 RQF_OST_PUNCH OST_PUNCH OST_PUNCH
426 RQF_OST_QUOTACHECK OST_QUOTACHECK OST_QUOTACHECK
430 RQF_OST_QUOTACTL OST_QUOTACTL OST_QUOTACTL
434 RQF_OST_SETATTR OST_SETATTR OST_SETATTR
438 RQF_OST_SET_GRANT_INFO OST_SET_GRANT_INFO
439 ost_grant_shrink_client
442 RQF_OST_SET_INFO_LAST_FID OST_SET_INFO_LAST_FID
446 RQF_OST_STATFS OST_STATFS OST_STATFS
450 RQF_OST_SYNC OST_SYNC OST_SYNC
454 RQF_OUT_UPDATE OUT_UPDATE_OBJ OUT_UPDATE
458 RQF_QC_CALLBACK QC_CALLBACK
462 RQF_QUOTA_DQACQ QUOTA_DQACQ
470 RQF_SEQ_QUERY SEQ_QUERY
477 These op codes apear in some *_cmd_t enumeration in lustre_idl.h, but
478 do not correspond to any RQF_* request format declaration in layout.c:
494 OST_QUOTA_ADJUST_QUNIT
504 A code audit will be needed to determine if they are unused or, like
505 MGS_CONNECT, are introduced in an ad hoc fashion at the point the
506 message is needed. If possible, the still in use op codes should be
507 folded into the new "struct req_format" style of declaration, and
508 their creation and management made uniform with the rest. In cases
509 where this is impossible, the reason and the handling should both be