1 RPC 38: MDS CONNECT - Client connection to an MDS
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 The general behavior of MDS_CONNECT RPCs closely resembles that of
6 OST_CONNECT RPCs (See <<ost-connect-rpc>>). The actual RPC's 'pb_opc'
7 value will be different as are the names of the targets and the
8 specific values in the 'obd_connect_data' structure.
10 .MDS_CONNECT Request Packet Structure
11 image::mds-connect-request.png["MDS_CONNECT Request Packet Structure",height=50]
13 //////////////////////////////////////////////////////////////////////
14 The mds-connect-request.png diagram resembles this text art:
17 --request--------------------------------------------------
18 | ptlrpc_body | target_uuid | client_uuid | lustre_handle |
19 -----------------------------------------------------------
22 //////////////////////////////////////////////////////////////////////
25 RPC descriptor. See <<struct-ptlrpc-body>>. In a connect message the
26 'ptlrpc_body' field 'pb_handle', which is a <<struct-lustre-handle>>,
27 is 0. That 'lustre_handle' is distinct from the one mentioned
31 A string identifying the target. See <<struct-obd-uuid>>. The client
32 learns the UUID strings for the targets via an interaction with the
36 A string with the client's own UUID. This is also an
37 <<struct-obd-uuid>>. The target sets the 'exp_client_uuid' field of
38 its 'export' structure to this value.
41 See <<struct-lustre-handle>>. This 'lustre_handle' is distinct from
42 the 'pb_handle' field in the 'ptlrpc_body'. This 'lustre_handle'
43 provides a unique 'cookie' to identify this client for this connection
44 attempt. After a disconnect, a subsequent connect RPC will have a
45 different value. The target preserves this cookie in the 'exp_handle'
46 field of its 'obd_export' structure for this client. In that way it
47 can distinguish between a resent connection request and an entirely
48 new connection request.
51 See <<struct-obd-connect-data>>.
53 The 'ocd_brw_size' field is set to the largest size in bytes that the
54 client can use for bulk transfers.
56 The 'ocd_ibits_known' field is set to the supported set of IBITS
57 locks. As of Lustre 2.7 these are MDS_INODELOCK_LOOKUP,
58 MDS_INODELOCK_UPDATE, MDS_INODELOCK_OPEN, MDS_INODELOCK_LAYOUT,
59 MDS_INODELOCK_PERM, and MDS_INODELOCK_XATTR>.
61 The 'ocd_version' field contains the version of Lustre
62 running on the client. Other fields in the 'obd_connect_data'
65 .MDS_CONNECT Reply Packet Structure
66 image::mds-connect-reply.png["MDS_CONNECT Reply Packet Structure",height=50]
68 //////////////////////////////////////////////////////////////////////
69 The mds-connect-reply.png diagram resembles this text art:
72 --reply---------------------------
73 | ptlrpc_body | obd_connect_data |
74 ----------------------------------
75 //////////////////////////////////////////////////////////////////////
78 RPC descriptor. See <<struct-ptlrpc-body>>. The 'pb_handle' field has
79 the value, C~t~, uniquely identifying that target. The value C~t~ is
80 preserved in the 'imp_remote_handle' field of the client's import
81 structure for this target. See <<struct-obd-import>>.
84 See <<struct-obd-connect-data>>.