Whamcloud - gitweb
LUDOC-296 protocol: Reorganize the document ot be top-down
[doc/protocol.git] / ost_connect.txt
1 RPC 8: OST CONNECT - Client connection to an OST
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 [[ost-connect-rpc]]
4
5 .OST_CONNECT (8)
6 [options="header"]
7 |====
8 | request            | reply
9 | obd_connect_client | obd_connect_server
10 |====
11
12 When a client initiates a connection to a specific target on an OSS,
13 it does so by sending an 'obd_connect_client' message and awaiting the
14 reply from the OSS of an 'obd_connect_server' message. From a previous
15 interaction with the MGS the client knows the UUID of the target OST,
16 and can fill that value into the 'obd_connect_client' message.
17
18 The 'ocd_connect_flags' field is set to (fixme: what?) reflecting the
19 capabilities appropriate to the client. The 'ocd_brw_size' is set to the
20 largest value for the size of an RPC that the client can handle. The
21 'ocd_ibits_known' and 'ocd_checksum_types' values are set to what the client
22 considers appropriate. Other fields in the descriptor and
23 'obd_connect_data' structures are zero, as is the 'lustre_handle'
24 element.
25
26 Once the server receives the 'obd_connect_client' message on behalf of
27 the given target it replies with an 'obd_connect_server' message. In
28 that message the server sends the 'pb__handle' to uniquely
29 identify the connection for subsequent communication. The client notes
30 that handle in its import for the given target.
31
32 fixme: Are there circumstances that could lead to the 'status'
33 value in the reply being non-zero? What would lead to that and what
34 error values would result?
35
36 The target maintains the last committed transaction for a client in
37 its export for that client. If this is the first connection, then that
38 last transaction value would just be zero. If there were previous
39 transactions for the client, then the transaction number for the last
40 such committed transaction is put in the 'pb_last_committed' field.
41
42 In a connection request the operation is not file system modifying, so
43 the 'pb_transno' value will be zero in the reply as well.
44
45 fixme: there is still some work to be done about how the fields are
46 managed.
47