1 Data Structures and Defines
2 ---------------------------
5 The following data types are used in the Lustre protocol description.
14 | __u8 | an 8-bit unsigned integer
15 | __u16 | a 16-bit unsigned integer
16 | __u32 | a 32-bit unsigned integer
17 | __u64 | a 64-bit unsigned integer
18 | __s64 | a 64-bit signed integer
26 The following topics introduce the various kinds of data that are
27 represented and manipulated in Lustre messages and representations of
28 the shared state on clients and servers.
34 A grant value is part of a client's state for a given target. It
35 provides an upper bound to the amount of dirty cache data the client
36 will allow that is destined for the target. The value is established
37 by agreement between the server and the client and represents a
38 guarantee by the server that the target storage has space for the
39 dirty data. The client can ask for additional grant, which the server
40 may provide depending on how full the target is.
46 Each target is assigned an LOV index (by the 'mkfs' command line) as
47 the target is added to the file system. This value is stored in the
48 MGS in order to identify its role in the file system.
54 For each target there is a sequence of values (a strictly increasing
55 series of numbers) where each operation that can modify the file
56 system is assigned the next number in the series. This is the
57 transaction number, and it imposes a strict serial ordering to all of
58 the file system modifying operations. For file system modifying
59 requests the server generates the next value in the sequence and
60 informs the client of the value in the 'pb_transno' field of the
61 'ptlrpc_body' of its reply to the client's request. For replys to
62 requests that do not modify the file system the 'pb_transno' field in
63 the 'ptlrpc_body' is just set to 0.
65 Miscellaneous Structured Data Types
66 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71 I have not figured out how so called 'eadata' buffers are handled,
72 yet. I am told that this is not just for extended attributes, but is a
78 A 'lustre_capa' structure conveys details about the capabilities
79 supported (or requested) between a client and a given target. I am
80 told that this is deprecated in later version of Lustre.
83 #define CAPA_HMAC_MAX_LEN 64
93 __u8 lc_hmac[CAPA_HMAC_MAX_LEN];
97 include::lustre_file_ids.txt[]
100 MGS Configuration Reference
101 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 #define MTI_NAME_MAXLEN 64
105 struct mgs_config_body {
106 char mcb_name[MTI_NAME_MAXLEN]; /* logname */
107 __u64 mcb_offset; /* next index of config log to request */
108 __u16 mcb_type; /* type of log: CONFIG_T_[CONFIG|RECOVER] */
110 __u8 mcb_bits; /* bits unit size of config log */
111 __u32 mcb_units; /* # of units for bulk transfer */
115 The 'mgs_config_body' structure has information identifying to the MGS
116 which Lustre file system the client is asking about.
118 MGS Configuration Data
119 ^^^^^^^^^^^^^^^^^^^^^^
122 struct mgs_config_res {
123 __u64 mcr_offset; /* index of last config log */
124 __u64 mcr_size; /* size of the log */
128 The 'mgs_config_res' structure returns information about the Lustre
131 include::lustre_handle.txt[]
133 Lustre Message Header
134 ^^^^^^^^^^^^^^^^^^^^^
135 [[lustre-message-header]]
137 Every message has an initial header that informs the receiver about
138 the size of the rest of the message to follow along with a few other
142 #define LUSTRE_MSG_MAGIC_V2 0x0BD00BD3
143 #define MSGHDR_AT_SUPPORT 0x1
144 struct lustre_msg_v2 {
155 #define lustre_msg lustre_msg_v2
158 The 'lm_buffcount' field gives the number of buffers that will follow
159 the header. The header and sequence of buffers constitutes one
160 message. Each of the buffers is a sequence of bytes whose contents
161 corresponds to one of the structures described in this section. There
162 will always be at least one, and no message has more than eight.
164 The 'lm_secflvr' field gives an indication of whether any sort of
165 cyptographic encoding of the subsequent buffers will be in force. The
166 value is zero if there is no "crypto" and gives a code identifying the
167 "flavor" of crypto if it is employed. Further, if crypto is employed
168 there will only be one buffer following (i.e. buffcount = 1), and that
169 buffer is an encoding of what would otherwise have been the sequence
170 of buffers normally following the header. This document will defer all
171 discussion of cryptography. An chapter is planned that will address it
174 The 'lm_magic' field is a "magic" value (LUSTRE_MSG_MAGIC_V2) that is
175 checked in order to positively identify that the message is intended
176 for the use to which it is being put. That is, we are indeed dealing
177 with a Lustre message, and not, for example, corrupted memory or a bad
180 The 'lm_repsize' field is an indication from the sender of an action
181 request of the maximum available space that has been set aside for
182 any reply to the request. A reply that attempts to use more than that
183 much space will be discarded.
185 The 'lm_cksum' has to do with the <<security>> settings for the
186 cluster. Fixme: This may not be in current use. We need to verify.
188 The 'lm_flags' field can be set to enable adaptive timeouts support
189 with the value MSGHDR_AT_SUPPORT.
191 The 'lm_padding*' fields are reserved for future use.
193 The array of 'lm_bufflens' values has 'lm_bufcount' entries. Each
194 entry corresponds to, and gives the length of, one of the buffers that
197 The entire header is required to be a multiple of eight bytes
198 long. Thus there may need to an extra four bytes of padding after the
199 'lm_bufflens' array if that array has an odd number of entries.
201 include::ptlrpc_body.txt[]
203 Object Based Disk UUID
204 ^^^^^^^^^^^^^^^^^^^^^^
223 struct lu_fid oi_fid;
224 } LUSTRE_ANONYMOUS_UNION_NAME;
228 include::mdt_structs.txt[]
230 include::mds_reint_structs.txt[]
232 include::ost_setattr_structs.txt[]
234 include::statfs_structs.txt[]